$.post("insert.ashx", { "UserName": UserName, "EmallAdd": EmallAdd, "Content": Content, "OrderNum": OrdNum }, function(data, states) {
                    if (states == "success") {
                                          }
                    else {
                                           }
现在要让它在操作成功后(states == "success")跳转到另一个页的!.......比如index.aspx    要怎么写啊

解决方案 »

  1.   

     window.location.href='./B/index.html'; 
      

  2.   

    我是想问一下post有没有什么参数是成功后自动跳转的
      

  3.   

    jQuery(function($) {
        var username = $("#username");
        var pwd = $("#pwd");
        var code = $("#code");
        $("#oalogin").click(function() {
        $.post("Ajax/Help/Ajax_Help.ashx?method=login&date=" + new Date().getTime(), { Action: "post", username: username.val(), pwd: pwd.val(), code: code.val()},
            function(data, textStatus) {
                if (data.result == 'Eok') {
                    top.location.href = "index.aspx?a0e4=ee11cbb19052e40b07aac0ca060c23ee";
                }
                else if(data.result == 'Aok') { 
                    top.location.href = "index.aspx?a0e4=21232f297a57a5a743894a0e4a801fc3";
                }
                else {
                            if(data.result=="Code")
                            {
                               showMsgErr("RegVerifyCode_info","");
                               pass=false;
                               return false;
                               checkform();
                            }
                            else if(data.result=="UP")
                            {
                              showMsgErr("loginid_info","");
                              showMsgErr("password_info","");
                              pass=false;
                              return false;
                              checkform();
                            }
                            else
                            {
                              checkform();
                            }
                }         }, "json");
        });
    });
      

  4.   

    没有 。
    =="success"后就跳转 ,代码上面的已给出 。
    那个functioin既是成功执行走的函数 。