jq.ajax({
                    type:"get",
                    url:"../ashx/store.ashx",
                    data:"m=4&userName="+UN+"&trueName="+TN+"&psw="+PSW+"&qq="+QQ+"&ID="+id+"&usertype="+UT+"&sex="+SEX
                    +"&tel="+TEL+"&addr="+ADDR+"&code="+CODE+"&email="+EL+"&question="+QT+"&answer="+AS,
                    async:false,
                    success:function(msg)
                    {
                        var temp=eval("("+msg+")"); 
                        alert(temp.message); 
                        if(temp.code==1)
                        
                         window.location.href ="default.html";
                    }
                })
请大家帮我分析下,这个页面跳转为什么没用呢?是因为引用了“jq.ajax”就无效了吗?应该怎么写啊?

解决方案 »

  1.   

    //检查返回值确实是1吗?
    alert(temp.code+"|长度: "+strLen(temp.code));  
      

  2.   

    确实是“1”,我在别的页面写的都跳转了,就这个不行,是不是jquery的关系啊?
      

  3.   

    那个跳转页面和代码所在页面有层级关系吗?需要写“~/*.html”这种格式吗?
      

  4.   

    楼主的"default.html"路径准确无误吗  
    $.ajax{
    }
      

  5.   

    这个路径要怎么写?“~/*.html”这种格式吗?
      

  6.   

    你先alert(temp.code)看看是不是1,如果是。改成下面的试试
    parseInt(temp.code)==1
      

  7.   

    if(parseInt(temp.code)==1){
        window.location.href='/default.html';
    }
    这样试过了??也没用?
    Lz,你到底是干脆没跳转,还是跳转了,但那个页面不是你真正要跳转的页面?
    上面怎么说那么多关于路径的干嘛?
      

  8.   

    if(parseInt(temp.code)==1){
       alert('执行了吗?');
    }