http://www.iteye.com/problems/131602
form 提交,后台运行有时慢,页面就不等后台数据的响应,直接alert("服务器维护中,请稍后再试!"); 
后来我发现,如果在action打断点,前台jsp直接会进入alert,根本就不会等待后台的响应。这是什么原因?
 
 
 
$(‘#DzMediumRegister‘).form(‘submit‘, { 
url : ‘registerAction!register.action‘, 
onSubmit : function(param) { 
param.regType = mediunRegType; 
param.wtms = $(‘#e_safeQuestions‘).combobox(‘getText‘); 
if(mediunRegType =="12"){//邮箱注册 
_email = $("#vv").val(); 
} 
if(mediunRegType =="11"){ 
_mobile = $("#zjmobile").val(); 
} 
//return true; 
return $(this).form(‘validate‘);//对数据进行格式化 
}, 
success : function(data) { 
if(jQuery.isEmptyObject(data)){ 
alert("服务器维护中,请稍后再试!"); 
} 
var obj = jQuery.parseJSON(data); 
if (obj.Success) { 
if(mediunRegType =="12"){//邮箱注册 
location.href = "<%=basePath%>jquery-easyui-1.4/demo/register2.jsp?yhbm="+obj.yhbm+"&email="+obj.email; 
}else if(mediunRegType =="11"){ 
location.href = "<%=basePath%>jquery-easyui-1.4/demo/register2.jsp?yhbm="+obj.yhbm+"&mobile="+obj.mobile; 
} 
} 
});
原文:http://www.cnblogs.com/zkwarrior/p/4834489.html