Javascript examples for DOM HTML Element:Option
Delete <option> from <select>
<html> <head> <script> removeIt = function()//from w w w .j a v a2 s.com { var theSelect = document.getElementById("theSelect"); var theOption = document.getElementById("theOption"); theSelect.removeChild(theOption); }; </script> </head> <body> <select id="theSelect"> <option>1</option> <option id="theOption">2</option> <option>3</option> </select> <input type="button" onclick="removeIt()" value="remove it!"> </body> </html>