function ajax(url, sendData, isAsync, functionList) {
$.ajax({
url: url,
type: "POST",
async: isAsync,
data: sendData,
xhr: function(){
var myXhr = $.ajaxSettings.xhr();
if(myXhr.upload){ //检查upload属性是否存在
//myXhr.timeout = 3000;
myXhr.upload.onprogress = functionList.progressFunction;
}
return myXhr; //xhr对象返回给jQuery使用
},
success: functionList.loadFunction,
error: functionList.errorFunction
});
}