$.ajax({ type: "post",url: "ajax.aspx",data: { Action: "LoginIn",UserName: $("#username").val(),LoginPwd: $("#password").val(),ip: $("#hdip").val() },async: false,success: function (data) { alert("登陆成功!"); window.location.href = "index.aspx"; } });原文链接:https://www.f2er.com/ajax/165761.html