HTML DOM marginWidth Property
Complete IFrame Object Reference
Definition and Usage
The marginWidth property sets or returns the left and right margins of a frame
(in pixels).
Syntax
iframeObject.marginWidth=pixels
|
Example
The following example returns the left and right margins of the iframe:
<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>
|
Try-It-Yourself Demos
Return the left and right margins of an iframe
Complete IFrame Object Reference
|