'options' Example : options « Javascript Collections « JavaScript Reference
- JavaScript Reference
- Javascript Collections
- options
'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