时间:2022-02-07 10:11:04 | 栏目:JavaScript代码 | 点击:次
js获取下拉列表框元素的个数
<form>
<select id="mySelect">
<option>Apple</option>
<option>Pear</option>
<option>Banana</option>
<option>Orange</option>
</select>
<input type="button" onclick="getLength()" value="How many options in the list?">
</form>
</body>
</html>