ajax post submit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title></title></head><body> <script src="Scripts/jquery-1.4.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $.ajax({ url: "http://192.168.1.xx:xxx/xx//user_delete.action", data: { uid: 36 }, dataType: "json", type: "post", timeout: 5000, success: testDelete, error: testError }); function testError(result) { alert(result); } function testDelete(result) { if (result.result == 0) { alert("删除失败……"); } else if (result.result == 1) { alert("success"); } }
</script></body></html>

原文地址:https://www.cnblogs.com/chinaniit/p/1920757.html