Javascript 中的 history对象

Javascript 中的 history对象

第一个html页面: js18.html

<!DOCTYPE html>
<html>
  <head>
    <title>js18.html</title>
  </head>
  
  <body>
    <a href="js19.html">js19.html</a>
  </body>
</html>

第二个html页面: js19.html

<!DOCTYPE html>
<html>
  <head>
    <title>js19.html</title>
  </head>
  
  <body>
    <a href="#" onclick="history.back();">Back</a>
  </body>
</html>

所以第一个页面中单击 js19.html link,会跳到 js19.html 页面。这是点击 Back link,会回到 js18.html。

posted @ 2012-07-30 21:18  allenbackpacker  阅读(213)  评论(0编辑  收藏  举报