1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execcommand(‘refresh‘)
6 window.navigate(location)
7 location.replace(location)
8 document.url=location.href.
____________________________________________
框架页中:(框架页中其中一个子页)
top.location.reload(); 刷新整页
self.location.reload(); 刷新本页
window.parent.location.href='' 框架页重定向
_____________________________________________
自动刷新页面的方法:1.页面自动刷新:把如下代码加入<head>区域中<meta http-equiv="refresh" content="20">其中20指每隔20秒刷新一次页面.<body onload="opener.location.reload()"> 开窗时刷新<body onunload="opener.location.reload()"> 关闭时刷新。
例:数据添加成功后弹出对话框并刷新页面
if (infoaction_sort.insert(info_sort))
{
scriptmanager.registerstartupscript(this.updatepanel, this.gettype(), alert, alert('相册分类添加成功');window.location.reload();, true);
//alert(相册分类创建成功);
//response.redirect(request.url.tostring());//刷新本页
this.txt_addsort.text = ;
this.txt_sortdepict.text = ;
}
更多js刷新页面的几种方法。
