假设该页面为test.jspleft帧不设置src属性,这样打开test.jsp页面时,left页面就不会被读取了。然后在test.jsp中增加一个window.onload方法,设置left的链接
例子如下:
<script>
function window.onload(){
this.left.location="http://www.csdn.net";
alert(this.main.document.all("show").value);
}
</script>
<iframe name="left" src="about:OK"></iframe>
<iframe name=main src="about:<input name=show value=100>" ></iframe>
例子如下:
<script>
function window.onload(){
this.left.location="http://www.csdn.net";
alert(this.main.document.all("show").value);
}
</script>
<iframe name="left" src="about:OK"></iframe>
<iframe name=main src="about:<input name=show value=100>" ></iframe>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货