自动刷新

HTML自动刷新:<meta http-equiv=“refresh” content=“20″> 其中20指每隔20秒刷新一次页面

HTML自动跳转:<meta http-equiv=“refresh” content=“20;url=http://www.qq.com”> 其中20指隔20秒后跳转到http://www.qq.com页面

Javascript利用timer自动刷新:

function myrefresh() {

window.location.reload();

setTimeout(’myrefresh()’,1000); //指定1秒刷新一次

Javascript刷新页面

  1. window.location.reload();
  2. window.history.go(0);   //可保持滚动条位置
  3. document.execCommand(’Refresh’);
  4. window.location.href=location.href; //在弹出新窗口刷新依然有效
  5. window.location.replace(window.location.href);
  6. window.location.assign(window.location.href);
  7. window.location.assign(location.href);
  8. window.navigate(location.href);
  9. window.open(”自身页面”,”_self”);
  10. window.location.reload(true);
  11. document.URL=window.location.href

 

 




转载本站文章请注明,转载自:神秘果

本文链接: http://www.shenmiguo.com/archives/2008/78_webpage-refresh.html

Tags: ,

相关日志

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>