确定$.ajax错误是否为超时
jQuery.ajax( settings )
.
$("form#testform").submit(function(){ var allFormValues = $("form#testform").serialize(); $.ajax({ cache:false, timeout:8000, // I chose 8 secs for kicks type:"POST", url:"someurl.php", data:allFormValues, error:function(){ alert("some error occurred") }, success:function(response){ alert(response); } });});
慕斯王
心有法竹