在A页面中点击链接。到B页面,B页面中写了js location.href到C页面。在C页面这么在浏览器的后退到A页面?

解决方案 »

  1.   

    重写后退健事件,history.go(-2) :)
      

  2.   

    有参数,直接location.href='a.html'这个不行?
      

  3.   

    B里面加个判断?if(history.previous = "a.htm")location.href="c.htm";
    else location.href = "a.htm";
      

  4.   

    安全原因, history.previous 是读不到的,借助cookie也许可以
      

  5.   

    应该给出可用条件,要不真不知道怎么弄.比如A页面是否有修改权限,B页面是否有修改权限等等.假设B页面有修改权限.那么直接把B页面中的location.href去了就可以了
      

  6.   

    在b.html页面中写
    location.replace(document.referrer) ;
    location.href= "c.html" ;
    在firefox中可以退。但IE中确不行。
      

  7.   

    哈哈,搞定了。在b.html页面中写 
    location.replace("c.html");