Chinaunix首页 | 论坛 | 博客
  • 博客访问: 240688
  • 博文数量: 108
  • 博客积分: 3045
  • 博客等级: 中校
  • 技术积分: 1162
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-19 18:26
文章分类

全部博文(108)

分类: JavaScript

2014-03-21 10:45:58

window:
document
location




header("Location:login.php");


window.navigate(url)
location.href='url'
location.replace('url')


记的:
location='url'
location.reload(true);


history
history.back();
history.go(-2);
screen


其它杂项
设首页
收藏

点击(此处)折叠或打开





  1. <html>
  2. <head>
  3.     

  4.     <title>Demo</title>

  5.     <script type="text/javascript" charset="utf-8">
  6.         
  7.         setTimeout(function(){


  8.                 //window.navigate('pop.html');
  9.                 //window.location.href='pop.html';

  10.                 //location='pop.html'; //主要方式
  11.                 
  12.                 //location.replace('pop.html');//不能后退

  13.                 location.reload(true);//每隔3秒刷新一次;
  14.                 },3000);


  15.         document.write(new Date()+"
    "
    );
  16.         document.write(new Date()+"
    "
    );
  17.         document.write(new Date()+"
    "
    );
  18.         document.write(new Date()+"
    "
    );
  19.         document.write(new Date()+"
    "
    );
  20.         document.write(new Date()+"
    "
    );
  21.         document.write(new Date()+"
    "
    );
  22.         document.write(new Date()+"
    "
    );
  23.     </script>
  24.     
  25. </head>
one.html

点击(此处)折叠或打开

  1. <a href="two.html">two</a>
two.html

点击(此处)折叠或打开

  1. <a href="three.html">three</a>
  2. <a href="javascript:history.back()">反回</a>
three.html

点击(此处)折叠或打开

  1. <a href="javascript:history.go(-1)">返回上一步</a>
  2. <a href="javascript:history.go(-2)">反回上二步</a>




阅读(881) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~