jQuery.ajax({
type: "post",
url: url,
cache: false,
async: false,
contenttype: "text/html;charset=gbk",
success: function(data){
if(data=='1'){
same=true;
}
}
type: "post",
url: url,
cache: false,
async: false,
contenttype: "text/html;charset=gbk",
success: function(data){
if(data=='1'){
same=true;
}
}
});
async: false的意思就是把异步修改为同步,必须执行完此部分的代码,才能向下执行。