$.ajax({
type: "POST",
url: "some.php",
async:false,
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
加上 async : false
jquery默认是true
$.ajax({
type: "POST",
url: "some.php",
async:false,
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
加上 async : false
jquery默认是true