HTML DOM src Property
Complete IFrame Object Reference
Definition and Usage
The src property sets or returns the URL of the document that should be loaded
into an iframe.
Syntax
Example
The following example changes the source of two iframes:
<html>
<head>
<script type="text/javascript">
function changeSource()
{
document.getElementById("frame1").src="frame_c.htm"
document.getElementById("frame2").src="frame_d.htm"
}
</script>
</head>
<body>
<iframe src="frame_a.htm" id="frame1"></iframe>
<iframe src="frame_b.htm" id="frame2"></iframe>
<br /><br />
<input type="button" onclick="changeSource()"
value="Change source of the two iframes" />
</body>
</html>
|
Try-It-Yourself Demos
Change the
source of two iframes
Complete IFrame Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|