HTML DOM size Property
Complete Select Object Reference
Definition and Usage
The size property sets or returns the number of visible rows in a dropdown list.
Note: Opera 9 cannot set this property in a script (only return it).
Syntax
Example
<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">
</form>
</body>
</html>
|
Try-It-Yourself Demos
Change
the number of visible rows in a dropdown list
Complete Select Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|