现在的位置: 首页 > 综合 > 正文

IE6 中 window.location.href 不能跳转

2013年10月08日 ⁄ 综合 ⁄ 共 360字 ⁄ 字号 评论关闭

window.location.href在IE6下面竟然不跳转,这是为什么呢?
这个是我写的语句:

  function Add() {
      url = "PaperSubmitMain.aspx?state=0&paperid=-1";
      window.location.href = url;
  
    }
  后面是网上找到了解决方案  

要加 这句返回值false 才行 一试 果然好了

    window.event.returnValue = false; 

 

 

  function Add() {
      url = "PaperSubmitMain.aspx?state=0&paperid=-1";
      window.location.href = url;
      window.event.returnValue = false;
    }

 

抱歉!评论已关闭.