A question about html select tags-- I'm here to give you another problem.

problem description

well, the customer puts forward a requirement for the drop-down selection box on the page, which is as follows:

clipboard.png

clipboard.png

"..."

selectoptionoptiondisabled
bootstrap-selectapiselectselect2


select2


select2

clipboard.png

what result do you expect? What is the error message actually seen?

I would like to ask if there is any other way to achieve this effect besides using plug-ins. Thank you.

Nov.22,2021

<select name="" id="">
    <option value="" style="display: none"></option>
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
</select>

A relatively simple method is as above: use display: none to hide the first option. By default, you will still get the first option label to show.
other methods, you can use input to achieve a select . By clicking on the event to control the display of the drop-down menu and maintain the selected state, you can control the performance of this control at will.


upstairs is feasible, agree

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b379ba-2c0af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b379ba-2c0af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?