Javascript examples for DOM HTML Element:Select
Select type Property - Return which type of form element a drop-down list that allows multiple selections is:
<!DOCTYPE html> <html> <body> <form> <select id="mySelect" multiple> <option>CSS</option> <option>HTML</option> <option>SQL</option> <option>Javascript</option> </select>//from w w w . j ava 2 s .c o m </form> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("mySelect").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>