HTML DOM rows 속성
정의와 사용법
rows 속성은 프레임 안의 행의 수와 크기를 설정하거나 반환할 수 있습니다。
콤마로 구분된 픽셀 또는 백분율 목록은 열의 수와 높이를 정의합니다:
문법
framesetObject.rows=row1,row2,row3....
예제
우리의 예제에서는 먼저 두 열을 가진 프레임셋을 포함한 HTML 문서를 생성합니다. 각 열은 브라우저 창의 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="행 크기를 변경" /> <input type="button" onclick="restoreRows()" /> value="행 크기를 복구" /> </form> </body> </html>