The
drop-down list box is not editable by default, and here's a good way to make the Drop-down list box editable, as follows, and you need a friend to refer to the following
Code as follows: <script> function clearoption (obj,e) { var currkey=0,e=e| | event; currkey=e.keycode| | e.which| | e.charcode; if (Currkey = 8) { Obj.options[0].text = ""; } } function Writeselect (obj,e) {& nbsp var currkey=0,e=e| | event; currkey=e.keycode| | e.which| | e.charcode; obj.options[0].selected = "Select"; if (Currkey!= 8) {//This place is to avoid the annoying garbled in Firefox, you can try to annotate this sentence And look at the effects of Firefox Obj.options[0].text = Obj.options[0].text + string.fromcharcode (currkey); } e.returnvalue=false; return obj.options[0].text; } function ttt () { var JG = document.getElementById ("AA"). Options[document.getelementbyid ("AA") .selectedindex].text; // Of course, you can also set the value of options in the previous Writeselect function, so that you can use value to remove jquery ("#aa") directly in the program. Empty (); jquery ("#aa "). Append (" <option value= ' ></option> "); } </script> code is as follows: <select style= ' Width:150px;z-index: -1 ' id= "AA" Name= "Selecthelpcode" onkeydown= "Clearoption (this,event)" onkeypress= "Writeselect (this,event)" > <option value= "" ></option> <option value= "one" >11</option> <option Value= ">22</option> <option value=" >33</option> </select> < Input type= "button" value= "clear" onclick= "TTT ();" />