大家说说怎么在ie6下用js实现网页的跳转,顺便散分好久没碰js了,都忘了
想在A.htm页面点击某个链接后网址跳到B.htm中,不在IIS中,只是纯粹的js实现,谁有办法?

解决方案 »

  1.   

    这个不行,注意是相对路径
    如果是这样
    window.location.href="http://www.baidu.com",就可以成功跳转
    但是
    window.location.href="b.htm"就不能跳转
      

  2.   

    相对路径为什么不可以~~~a.html
    b.html
    在一个文件夹下
    然后a.html里写
    window.location.href = "b.html";
      

  3.   

    window.open("/b.html");//直接打开
    window.location="/b.html"//替换当前的url
    window.location.href="/b.html"//等价于window.location
    window.location.assign("/b.html")//加载新的文档
    window.location.replace("/b.html")//替换当前文档,不会计入历史记录中