js ajax return false了,仍然会往下执行
1 function checkMust(){ 2 var flag=false; 3 $.getJSON("../Ajax/Carton/Ajax_TMSOrder_Create.ashx?r=" + Math.random(), { "action": "GetToWaybill","WAYBILLNO": $("#tbWaybillNo").val(), "FWDCD": $("#ddlForwarder").val() }, function (r) { 4 if (r.length > 0) { 5 alert("<%= Resources.GlobalResource_Carton.ErMsg91%>"); 6 flag=true; 7 } 8 }); 9 if(flag){ 10 return false; 11 } 12 return true; 13 }