history里的记录是不能够被读取的,这是浏览器的安全机制设定的。你甭想了。

解决方案 »

  1.   

    不能,只能得到个数
    <script>
    alert(history.length)
    </script>
    和方法:
    history.go(-2)
    history.back()等
      

  2.   

    For security reasons, the history object does not expose the actual URLs in the browser history. It does allow navigation through the browser history by exposing the back, forward, and go methods. A particular document in the browser history can be identified as an index relative to the current page. For example, specifying -1 as a parameter for the go method is the equivalent of clicking the Back button.