HTML DOM marginHeight 屬性
定義和用法
marginHeight 屬性可設(shè)置或返回框架頂部和底部的頁面空白(以像素計(jì))。
語法
iframeObject.marginHeight=pixels
實(shí)例
下面的例子可返回 iframe 頂部和底部的頁面空白:
<html> <body> <iframe src="frame_a.htm" id="frame1" marginheight="50"></iframe> <br /> <script type="text/javascript"> x=document.getElementById("frame1"); document.write("Top and bottom margins of the iframe are: "); document.write(x.marginHeight); </script> </body> </html>