在用jquery框架进行登陆验证时,当输入成功的帐号,会弹对话框,页面不会跳转
谁能告诉我是为什么

解决方案 »

  1.   

    可能是你的验证成功后没有写url链接地址
    <script type="text/javascript">
    function check(){
    $.ajax({
    type:'POST',
    url:'/news/login/login.do?dispatch=login',
    data:"username="+$('#div1').val()+"&password="+$('#div2').val(),
    success:function(msg){
    if(msg=="0"){
    window.location="/news/login/frameindex.html";
    }
    else if(msg=="1"){
    window.location="/news/login/frameindex_1.html";
    }

    }
    });
    }
      

  2.   

    这里的msg 是在后台 action 传过来的 为0 时 是验证成功,为1时是验证失败