خصائص rows في DOM HTML
التعريف والاستخدام
يمكن تعيين أو إرجاع عدد الأعمدة والحجم باستخدام خاصية rows.
قائمة من الأرقام أو النسب المئوية منفصلة بالكومياء تعين عدد الأعمدة وارتفاعها:
النحو
framesetObject.rows=row1,row2,row3....
مثال
في مثالنا، سنقوم أولاً بإنشاء ملف HTML يحتوي على إطار عمل يحتوي على عمودين:
<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>