欢迎来到天天文库
浏览记录
ID:15584761
大小:106.50 KB
页数:5页
时间:2018-08-04
《js刷新页面方法大全》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、一、先来看一个简单的例子: 下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。 frame.html由上(top.html)下(bottom.html)两个页面组成,代码如下: 1 2 3
2、frameset rows="50%,50%"> 7 8 9 10 现在假设top.html(即上面的页面)有七个button来实现对bottom.html(即下面的页面)的刷新,可以用以下七种语句,哪个好用自己看着办了。 1top.html 页面的代码如下: 2 3
3、HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 4 5
4、w.parent.frames.bottom.location.reload()"> 11 12 13
5、=button value="刷新5" onclick="window.parent.frames.item('bottom').location.reload()"> 14 15
6、ad()"> 16 17 18 下面是bottom.html页面源代码,为了证明下方页面的确被刷新了,在装载完页面弹出一个对话框。 1 2 3 4
7、')"> 8
8、个框架页面,里面还是其它的子页面,那么上面的有些方法可能不行。 附: Javascript刷新页面的几种方法: 1 history.go(0) 2 location.reload() 3 location=location 4 location.assign(location) 5 document.execCommand('Refresh') 6 window.navi
此文档下载收益归作者所有