1.html内容如下:
<script language="javascript">
location.replace("2.html");
</script>2.html内容如下:
<script language="javascript">
location.replace("3.html");
</script>3.html内容如下://在这里用什么方法可以获取,最先的入口网址的文件名,即1.html文件名
//因为是在做一个流量统计,不可能有借助于传递参数来完成,
//我试着用alert(window.parent.parent.location);也无法实现,请大家指教

解决方案 »

  1.   

    可以 传参数就可以了比如 1.html  -->  location.replace("2.html?start=1");
    2.html判断URL后缀有没有START参数 
    没有则证明是直接访问  location.replace("3.html?start=2");
    有则吧这个参数继续带给下一个页面location.replace("3.html?start=1");后面就依次类推
      

  2.   

    理论上讲,History对象应该是可以获取到历史记录的。
     但是,出于安全考虑,DOM中的History封掉了这些方法。
    ---
    window.parent好像只能获取到window.open这种打开的窗口的父对象。
    而不能获取到location.href这种形式的地址。
    ----