HTML DOM rows 屬性
定義和用法
rows 屬性設(shè)置或返回 textarea 的高度。
語法
textareaObject.rows=number_of rows
實(shí)例
本例改變 textarea 的高度:
<html>
<head>
<script type="text/javascript">
function changeRows()
{
document.getElementById('txt1').rows="15";
}
</script>
</head>
<body>
<textarea id="txt1">
Hello world....This is a text area
</textarea>
<br />
<input type="button" onclick="changeRows()" value="Change height" />
</body>
</html>