刷新页面的几种方法总结:
<input type=button value=刷新 onclick="history.go(0)">
<input type=button value=刷新 onclick="location.reload()">
<input type=button value=刷新 onclick="location=location">
<input type=button value=刷新 onclick="location.assign(location)">
<input type=button value=刷新 onclick="document.execCommand('Refresh')">
<input type=button value=刷新 onclick="window.navigate(location)">
<input type=button value=刷新 onclick="location.replace(location)">
刷新整个页面
//如果在frameset内部时,让整个页面跳转到登陆页面
if (top.location != self.location)
{
top.location = self.location;
}

本文总结了多种刷新网页的方法,包括使用history、location等对象的不同属性和方法实现页面的刷新与重定向,适用于不同场景的需求。

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



