$.ajax({ type : "get", async:false, url : "http://127.0.0.3/json/ajax_do.php", dataType : "jsonp", jsonp: "callback",//服务端用于接收callback调用的function名的参数 jsonpCallback:"success_jsonpCallback",//callback的function名称 success : function(json){ alert(json); console.log(json); }, error:function(){ alert('fail'); } }); /************************************/ $.ajax({ url:'http://127.0.0.3/json/ajax_do.php?callback=?', type:'get', dataType:'jsonp', data:$("#projectForm").serialize(), success:function(d){ console.log(d); }, error:function(msg){ alert("授权申请提交失败,请联系技术服务!"); } }); /******************************************/ var jqxhr = $.getJSON( "http://127.0.0.3/json/ajax_do.php?callback=?", $("#projectForm").serialize() , function(d) { console.log( "success" ); }) .done(function() { console.log( "second success" ); }) .fail(function() { console.log( "error" ); }) .always(function() { console.log( "complete" ); }); jqxhr.complete(function() { console.log( "second complete" ); });