HTML Standard attribute: rows
[this page | pdf | back links]
The HTML rows attribute indicates the visible
number of lines in a <textarea>
element.
Valid attribute
values (when used with <textarea>
elements) include:
Value
|
Description
|
integer
|
Visible number of rows
(lines) in text area
|
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Created using HTML:<br>
<form action="http://www.nematrian.com/ExpressionEvaluator.aspx">
<textarea type="text" name="expr" rows="3" cols="25">3*5</textarea>
<br><input type="submit" value="Go to webpage to evaluate">
</form>
<br>Created using JavaScript:<br>
<span id="element"></span>
<script>
var f = document.createElement("FORM");
f.setAttribute("action","http://www.nematrian.com/ExpressionEvaluator.aspx");
var x1 = document.createElement("TEXTAREA");
x1.setAttribute("type","text");
x1.setAttribute("name","expr");
x1.setAttribute("rows","3");
x1.setAttribute("cols","25");
var txt1 = document.createTextNode("3*5");
x1.appendChild(txt1);
var br1 = document.createElement("BR");
var x2 = document.createElement("INPUT");
x2.setAttribute("type","submit"); x2.setAttribute("value","Go to webpage to evaluate");
f.appendChild(x1);
f.appendChild(br1);
f.appendChild(x2);
document.getElementById("element").appendChild(f);
</script>
</body>
</html>
|
NAVIGATION LINKS
Contents | Prev | Next | HTML Attributes