function fetchJSON_comment98($str) {
console.log('我是回调函数-我先执行');
console.log($str);
}
function test_jsonp(){
$.ajax({
url:'http://www.baidu.com',
dataType:"jsonp",
jsonpCallback:'fetchJSON_comment98',
success:function(result){
console.log('先执行完回调函数,我在执行');
},
error: function() {
console.log('失败');
}
})
}
test_jsonp()
function fetchJSON_comment98($str) {
console.log('我是回调函数-我先执行');
console.log($str);
}
function test_jsonp(){
$.ajax({
url:'http://www.baidu.com',
dataType:"jsonp",
jsonpCallback:'fetchJSON_comment98',
success:function(result){
console.log('先执行完回调函数,我在执行');
},
error: function() {
console.log('失败');
}
})
}
test_jsonp()