1. 程式人生 > >Ajax請求中的async設定為false/true的區別

Ajax請求中的async設定為false/true的區別

$(function(){
var data ;
$.ajax({
url:eve.contextPath+'/jf/know/knowledge/findName',
type:'post',
dataType:'json',
async:false,
success:function(result){
data =  result;
}
});
$("#tt").bigAutocomplete({
width:543,
//url:eve.contextPath+'/jf/know/knowledge/findName',
data:data
});