框架刷新

来源:互联网 发布:知乎dota2爆料 编辑:程序博客网 时间:2024/04/26 05:55

frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:

<frameset rows="50%,50%">
<frame name=top src="top.html">
<frame name=bottom src="bottom.html">
</frameset>

现在假设top.html (即上面的页面) 有七个button来实现对bottom.html (即下面的页面) 的刷新,可以用以下七种语句,哪个好用自己看着办了。

语句1. window.parent.frames[1].location.reload();
语句2. window.parent.frames.bottom.location.reload();
语句3. window.parent.frames["bottom"].location.reload();
语句4. window.parent.frames.item(1).location.reload();
语句5. window.parent.frames.item(''bottom'').location.reload();
语句6. window.parent.bottom.location.reload();
语句7. window.parent[''bottom''].location.reload();

 

 

转自:http://hi.baidu.com/woctyln/blog/item/8254dc605a5b24d58cb10d07.html

原创粉丝点击