- ·上一篇内容:如何让图片自动适应网页的大小
- ·下一篇内容:document.all.WebBrowser.ExecWB()方法介绍
网页刷新方法集锦
我们在制作网页过程中,经常需要刷新网页来更新网页的内容,那么如何实现网页刷新呢?下面就给出网页刷新的相关代码,供大家参考:
(1)<input type=“button” value=“刷新当前页" onclick="history.go(0);">
(2)<input type="button" value=”刷新当前页" onclick="location=location;">
(3)<input type="button" value="刷新当前页" onclick="location.reload();">
(4)<input type="button" value="刷新当前页" onclick="location.replace(location);">
(5)<input type="button" value="刷新当前页" onclick="window.navigate(location);">
(6)<input type=“button" value="刷新当前页" onclick="document.execCommand(@#Refresh@#)">
(7)<input type=”button" value="刷新当前页" onClick="document.all.WebBrowser.ExecWB(22,1)">
(8)<input type="button" value="刷新当前页" onclick="window.open(@#自身的文件@#,@#_self@#)">
前5种网页刷新方法,大家都比较熟悉,而后三种网页刷新方法可能大家比较陌生,实际上后三种需在IE5.5以上的浏览器中支持。具体参加本网站的文章:
(2)document.all.WebBrowser.ExecWB()方法介绍
本文源自:翔宇亭——IT乐园(http://www.biye5u.com),转载请保留此信息!
微信搜索“优雅的代码”关注本站的公众号,或直接使用微信扫描下面二维码关注本站公众号,以获取最新内容。
个人成长离不开各位的关注,你的关注就是我继续前行的动力。