您的位置:首页 > Web前端 > JavaScript

js页面刷新事件 ,Javascript刷新页面的几种方法

2013-11-29 10:21 603 查看
1)
<meta http-equiv="refresh"content="10;url=跳转的页面">
10表示间隔10秒刷新一次

2)
<script language=''javascript''>
window.location.reload(true);
</script>
如果是你要刷新某一个iframe就把window给换成frame的名字或ID号

3)
<script language=''javascript''>
window.navigate("本页面url");
</script>

4>
function abc()
{
window.location.href="/blog/window.location.href";
setTimeout("abc()",10000);
}
刷新本页:
Response.Write("<script language=javascript>window.location.href=window.location.href;</script>")
刷新父页:
Response.Write("<script language=javascript>opener.location.href=opener.location.href;</script>")
转到指定页:
Response.Write("<script language=javascript>window.location.href='yourpage.aspx';</script>")
Javascript刷新页面的几种方法:1 history.go(0)2 location.reload()3 location=location4 location.assign(location)5 document.execCommand('Refresh')6 window.navigate(location)7 location.replace(location)8 document.URL=location.href
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: