rows 属性可设置或返回框架中行的数目和尺寸。
由逗号分割的像素或百分比列表定义了列的数目和高度:
</>code
- framesetObject.rows=row1,row2,row3....
在我们的例子中,首先将创建包含带有两个列的框架集的 HTML 文档。每列设置为浏览器窗口的 50%:
</>code
- <html>
- <frameset rows="50%,50%">
- <frame src="frame_rows.htm">
- <frame src="frame_a.htm">
- </frameset>
- </html>
HTML 文档 "frame_rows.htm" 被放入第一列,而 HTML 文档 "frame_a.htm" 被放入第二列。
下面是 "frame_rows.htm" 的源代码:
</>code
- <html>
- <head>
- <script type="text/javascript">
- 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>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号