JQUERY POST操作 在线等的
$.post("insert.ashx", { "UserName": UserName, "EmallAdd": EmallAdd, "Content": Content, "OrderNum": OrdNum }, function(data, states) {if (states == "success") {
}
else {
}
现在要让它在操作成功后(states == "success")跳转到另一个页的!.......比如index.aspx 要怎么写啊 --------------------编程问答-------------------- window.location.href='./B/index.html';
--------------------编程问答-------------------- 我是想问一下post有没有什么参数是成功后自动跳转的 --------------------编程问答-------------------- 大家快帮忙看一下的!要怎么写才可以的!我那个是插入数据库的!然后跳转的... --------------------编程问答--------------------
jQuery(function($) {--------------------编程问答-------------------- locahost.href="地址": --------------------编程问答--------------------
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");
});
});
没有 。
=="success"后就跳转 ,代码上面的已给出 。
那个functioin既是成功执行走的函数 。 --------------------编程问答-------------------- 1楼和4楼已经说的很清楚啦!
补充:.NET技术 , ASP.NET