Select multiple options in a dropdown list (option)
<html> <head> <script type="text/javascript"> function formAction(){ var x=document.getElementById("aSelectControl") x.multiple=true } </script> </head> <body> <form> <select id="aSelectControl" size="3"> <option>Java</option> <option>PHP</option> <option>Perl</option> </select> <input type="button" onclick="formAction()" value="Set to Select multiple"> </form> </body> </html>