//Support cross-domain calls $.ajax({ type:"POST", async :false, url:"http://web3.com:9080/authority/dept/hellob.shtml?userName=zqb&callback=?", dataType:"jsonp", success:function(data){ //alert(data); console.log(data); }, error:function(){ alert("error"); } }); } // Cross-domain calls are not supported function b(){ $.ajax({ type: "post", dataType: "html", url: "http://web3.com:9080/authority/dept/hellob.shtml?userName=zqb", data: "", success: function (data) { console.log(data); } }); }
How to write ajax cross-domain call and non-cross-domain call
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326711505&siteId=291194637
Ranking