We would like to know how to get options length from select dropdown.
<!--from ww w . j a v a 2 s . c o m-->
<html>
<form name="myForm">
<select name="mySelect" onChange='console.log(mySelect.options.length)'>
<option value=A>AA</option>
<option value=B>BB</option>
<option value=C>CC</option>
<option value=D>DD</option>
</select>
</form>
</html>
The code above is rendered as follows: