HTML 文檔 "frame_id.htm" 被放入第一列,而 HTML 文檔 "frame_a.htm" 被放入第二列。
下面是 "frame_id.htm" 的源代碼:
<html>
<body>
<script type="text/javascript">
x=parent.document.getElementsByTagName("frame")[0];
y=parent.document.getElementsByTagName("frame")[1];
document.write("The id for the left frame is: ");
document.write(x.id);
document.write("<br />The id for the right frame is: ");
document.write(y.id);
</script>
</body>
</html>