JavaScript刷新框架及页面方法_JavaScript刷新页面方法总集
时间:2026-07-21 09:56:07来源:汇创宝软件作者:佚名用手机看
扫描二维码随身看资讯
使用手机 二维码应用 扫描右侧二维码,您可以
1. 在手机上细细品读~
2. 分享给您的微信好友或朋友圈~
先来看一个简单的例子:
下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。
frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:
<frameset rows=50%,50%>
<frame name=top src=top.html>
<frame name=bottom src=bottom.html>
现在假设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();
top.html 页面的代码如下:
<body>
