Javascript examples for DOM HTML Element:Select
Select multiple Property - Find out if more than one option in a drop-down list can be selected:
<!DOCTYPE html> <html> <body> <form> <select id="mySelect" size="4"> <option>CSS</option> <option>HTML</option> <option>SQL</option> <option>Javascript</option> </select>/*from w w w. j a va 2 s . c o m*/ </form> <button type="button" onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var v = document.getElementById("mySelect").multiple; document.getElementById("demo").innerHTML = v; } </script> </body> </html>