??var?url?=?'https://y.qq.com/download/download.js?jsonpCallback=MusicJsonCallback&loginUin=0&hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8¬ice=0&platform=yqq&needNewCode=0'
???$.ajax({
??? url:url,
??? type:'get',
??? async:true,
??? dataType:'jsonp',
??? data:{music:'ni?hao'},
??? "beforeSend":function(xhr){
????????????//xhr.abort()??//原生js?取消請(qǐng)求?后續(xù)工作全部取消
????????},
??? success:function(data,statusText,xhr){
??? console.log(data,statusText,xhr)???
??? }
???})url 后面的參數(shù)是否需求取消??? 另外請(qǐng)求上送數(shù)據(jù)是否可以不寫或者隨便寫? 跨域請(qǐng)求不會(huì),請(qǐng)大神指點(diǎn)一下,想把網(wǎng)絡(luò)上的數(shù)據(jù)請(qǐng)求到本地,最好附上源碼。
jquery ajax 跨域請(qǐng)求 怎么寫? url的到底該怎么寫? 回調(diào)函數(shù)寫哪里?
Etoo9
2017-10-27 19:24:47