'options' Example : options « Javascript Collections « JavaScript Reference

'options' Example

    
<html>
<body>
<select id="mySelect">
    <option>List Item 1</option>
    <option>List Item 2</option>
    <option>List Item 3</option>
</select>
<button onclick="alert(mySelect.options.length);">Number of options in the select list</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'options' Syntax Parameters and Note
2.'options' JavaScript properties and JavaScript methods
3.'options' is applied to