HTML DOM marginWidth 屬性
定義和用法
marginWidth 屬性可設(shè)置或返回框架的左側(cè)和右側(cè)邊緣的頁(yè)面空白(以像素為單位)。
語(yǔ)法
iframeObject.marginWidth=pixels
實(shí)例
下面的例子將返回 iframe 的左邊緣和右邊緣的頁(yè)空白:
<html>
<body>
<iframe src="frame_a.htm" id="frame1" marginwidth="50"></iframe>
<br /><br />
<script type="text/javascript">
x=document.getElementById("frame1");
document.write("Left and right margins of the iframe are: ");
document.write(x.marginWidth
);
</script>
</body>
</html>