当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM size 属性
The size property sets or returns the number of rows in a drop-down list.
size属性可设置或返回下拉列表中的行数
selectObject.size=number |
<html>
<head>
<script type="text/javascript">
function changeSize()
{
document.getElementById("mySelect").size=4
}
</script>
</head> <body> <form> <select id="mySelect"> <option>Apple</option> <option>Banana</option> <option>Orange</option> <option>Melon</option> </select> <input type="button" onclick="changeSize()" value="Change size of list"> </form> </body> </html> |
Turn the dropdown list into a multiline list
将下拉列表转变成一个多选列表
评论 (0) All