<ptml xmlns= "http://www.w3.org/1999/xhtml" > <pead> <title> clicking Button, the text box becomes a Select Drop-down list box </title> <script type= "Text/javascript" > Function Showselect () {var _t = document.getElementById (' t '); var _s = document.getElementById (' sel '); if (_t.style.display = = ') {_t.style.display = ' none '; } else{_t.style.display = '; } if (_s.style.display = = ' None ') {_s.style.display = '; } else{_s.style.display = ' none '; } </script> </pead> <body> <input type= "text" name= "T" id= "T" value= "ASP" > <select name = "sel" id= "sel" > <option value= "0" >ASP</option> <option value= "1" >ASP.NET</option> < Option value= "2" >PHP</option> <option value= "3" >JAVA</option> </select> <input type= " Submit "Name=" Submit "onclick=" Showselect (); "value=" You are good at/> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]