Latest web development tutorials

HTML DOM Frameset rows property

Frameset Object Reference Frameset objects

Definition and Usage

rows property sets or returns the number of rows and frame size.

Or the percentage of a comma-delimited list of pixels defines the number of columns and height.

grammar

framesetObject.rows=values

rows attribute can be one or more of the following values:

描述
pixels row 高度可以以像素指定 (如 "100px" 或者 "100")
% row 高度可以是百分比指定 (如"50%")
* 剩余可用空间


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support rows property.


Examples

In our example, first create a frameset with two columns of the HTML document. Each column is set to 50% of the browser window:

<html>
<frameset id="main" rows="50%,50%">
  <frame src="frame_rows.htm">
  <frame src="frame_a.htm">
</frameset>
</html>

"Frame_rows.htm" Source code is as follows:

Example

<html>
<head>
<script>
function changeRows()
  {
  parent.document.getElementById("main").rows="30%,70%"
  }
function restoreRows()
  {
  parent.document.getElementById("main").rows="50%,50%"
  }
</script>
</head>
<body>

<form>
<input type="button" onclick="changeRows()" value="Change row size">
<input type="button" onclick="restoreRows()" value="Restore row size">
</form>

</body>
</html>

try it"


Frameset Object Reference Frameset objects