HTML DOM width Property
Complete IFrame Object Reference
Definition and Usage
The width property sets or returns the width of an iframe (in pixels).
Syntax
iframeObject.width=pixels
|
Example
The following example changes the width of the iframe:
<html>
<head>
<script type="text/javascript">
function changeWidth()
{
document.getElementById("frame1").width="100";
}
</script>
</head>
<body>
<iframe src="frame_a.htm" id="frame1" width="200"></iframe>
<br /><br />
<input type="button" onclick="changeWidth()"
value="Change size" />
</body>
</html>
|
Try-It-Yourself Demos
Change the height and width of an iframe
Complete IFrame Object Reference
|