Frameset rowsProperty

Frameset 对象参考手册Frameset Object

Definition and Usage

The rows property sets or returns the number and size of rows in a frameset.

A comma-separated list of pixels or percentages defines the number and height of columns.

Syntax

framesetObject.rows=values

The rows property can be one or more of the following values:

Value Description
pixels Row height can be specified in pixels (e.g. "100px" or "100")
% Row height can be specified as a percentage (e.g. "50%")
* Remaining available space


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the rows property.


Example

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

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

The source code of "frame_rows.htm" 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 Yourself »


Frameset 对象参考手册Frameset Object Other Extensions