// 設(shè)置Ajax操作的默認(rèn)設(shè)置
$.ajaxSetup({
cache: false,
error: function (XMLHttpRequest, textStatus, errorThrown) {
if( typeof(errorThrown) != "undefined" )
$.messager.alert(g_MsgBoxTitle, "調(diào)用服務(wù)器失敗。br />" + errorThrown ,'error');
else{
var error = "b style='color: #f00'>" + XMLHttpRequest.status + " " + XMLHttpRequest.statusText + "/b>";
var start = XMLHttpRequest.responseText.indexOf("title>");
var end = XMLHttpRequest.responseText.indexOf("/title>");
if( start > 0 end > start )
error += "br />br />" + XMLHttpRequest.responseText.substring(start + 7, end);
$.messager.alert(g_MsgBoxTitle, "調(diào)用服務(wù)器失敗。br />" + error ,'error');
}
}
});