HTML DOM name Property
Complete Frame Object Reference
Definition and Usage
The name property sets or returns the name of a frame.
Syntax
Example
In our example we will first create an HTML document containing a frameset
with two columns. Each column is set to 50% of the browser window:
<html>
<frameset cols="50%,50%">
<frame id="leftFrame" name="toc" src="frame_name.htm">
<frame id="rightFrame" name="main" src="frame_a.htm">
</frameset>
</html>
|
The HTML document "frame_name.htm" is put into the first column, and the
HTML document "frame_a.htm" is put into the second column.
The source of "frame_name.htm" is as follows:
<html>
<body>
<script type="text/javascript">
x=parent.document.getElementById("leftFrame");
y=parent.document.getElementById("rightFrame");
document.write("The name of leftFrame is: ");
document.write(x.name);
document.write("<br />The name of rightFrame is: ");
document.write(y.name);
</script>
</body>
</html>
|
Try-It-Yourself Demos
Return
the name of frames
Complete Frame Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|