不支持cors
也不支持jsonp的callback
var url = 'http://www.runoob.com/try/angularjs/data/sites.php';
function hello(res) {
console.log(res);
}
function jsonp(url) {
var script = document.createElement('script');
script.src = url;
script.id = 'test'
document.body.appendChild(script);
}
window.onload = function(){
jsonp(url)
}
貌似无解?
相关分类