HTML DOM Option Object

Option Object The Option object represents an HTML <option> element. Access an Option Object You can access an <option> element by using getElementById(): Example var x = document.getElementById(“myOption”); Try it Yourself » Tip: You can also access an Option object by searching through the elements collection of a form, or the options collection of a drop-down list. Create an Option Object […]