首页 > 开发 > HTML > 正文

网页刷新方法集锦

2023-04-11 12:31:39
字体:
来源:转载
供稿:网友

我们在制作网页过程中,经常需要刷新网页来更新网页的内容,那么如何实现网页刷新呢?下面就给出网页刷新的相关代码,供大家参考:

(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以上的浏览器中支持。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表