HTML DOM Textarea Eigenschaft rows
Definition und Verwendung
Reihen Eigenschaftssätze oder Renditen TextArea- Höhe.
Grammatik
Festlegen Zeilen-Attribute:
textareaObject.rows=number
Gibt Zeilen Attribute:
textareaObject.rows
Tipp: Reihen Eigenschaft hat keinen Standardwert.
值 | 描述 |
---|---|
number | 指定在文本区域中可见的行数 |
Browser-Unterstützung
Alle gängigen Browser unterstützen Reihen Immobilien
Beispiele
Beispiele
Ändern Sie die Textfeld sichtbaren Zeilen:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult()
{
document.getElementById("myTextarea").rows=10;
}
</script>
</head>
<body>
<textarea id="myTextarea" cols="20">
在本教程,你可以学多很多编程的基础知识,包括 HTML, XML, SQL, ASP, 和 PHP 等各种前端内容。
</textarea>
<br>
<button type="button" onclick="displayResult()">修改可见行数</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult()
{
document.getElementById("myTextarea").rows=10;
}
</script>
</head>
<body>
<textarea id="myTextarea" cols="20">
在本教程,你可以学多很多编程的基础知识,包括 HTML, XML, SQL, ASP, 和 PHP 等各种前端内容。
</textarea>
<br>
<button type="button" onclick="displayResult()">修改可见行数</button>
</body>
</html>
Textarea - Objekt