HTML DOM rows-eigenschap
Definitie en gebruik
De rows-eigenschap kan het aantal en de maat van de rijen in het kader instellen of retourneren.
Een lijst van pixels of percentages, gescheiden door komma's, definieert het aantal kolommen en hun hoogte:
Syntaxis
framesetObject.rows=row1,row2,row3....
Voorbeeld
In ons voorbeeld wordt eerst een HTML-document gemaakt dat een frameset bevat met twee kolommen. Elke kolom is ingesteld op 50% van het browservenster:
<html> <frameset rows="50%,50%"> <frame src="frame_rows.htm"> <frame src="frame_a.htm"> </frameset> </html>
The HTML document "frame_rows.htm" is placed in the first column, and the HTML document "frame_a.htm" is placed in the second column.
Below is the source code for "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>