rows 屬性可設(shè)置或返回框架中行的數(shù)目和尺寸。
由逗號(hào)分割的像素或百分比列表定義了列的數(shù)目和高度:
framesetObject.rows=row1,row2,row3....
在我們的例子中,首先將創(chuàng)建包含帶有兩個(gè)列的框架集的 HTML 文檔。每列設(shè)置為瀏覽器窗口的 50%:
<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" 的源代碼:
<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>
如對(duì)本文有疑問,請(qǐng)?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會(huì)為你解答?。?點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)