window.history.go(0)
window.location.reload()
window.location.href=location.href
window.location.assign(location.href)
document.execCommand('Refresh')
window.navigate(location.href)
window.navigate("#pos");
window.location.replace(location.href)
window.open('自身的文件','_self')
-------------
location.reload(flag)
flag =true 不从缓存读取
=false 从缓存读取
window.location.reload()
window.location.href=location.href
window.location.assign(location.href)
document.execCommand('Refresh')
window.navigate(location.href)
window.navigate("#pos");
window.location.replace(location.href)
window.open('自身的文件','_self')
-------------
location.reload(flag)
flag =true 不从缓存读取
=false 从缓存读取
本文介绍了多种在网页浏览器中实现页面刷新的方法,包括使用history、location对象及文档命令等,适用于不同场景下的页面更新需求。
5万+

被折叠的 条评论
为什么被折叠?



