0
我尝试从另一个服务器加载静态html页面。我发出跨域请求。跨域请求
$(document).ready(function(){
$("div[src]").each(function(){
var staticFileURL = $(this).attr('src');
$.ajax({
url: staticFileURL,
dataType: 'jsonp',
data: {},
error: function(xhr, status, error) {
alert(error);
},
success: function() {
alert("success");
},
jsonp: false,
jsonpCallback: 'jsonpCallback'
});
});
});
但我得到了chrome错误“SyntaxError:意外的标记<”。
在FF“SyntaxError:无效的xml属性值”中。 怎么了,有人帮我吗?
通常是“意外的标记<”就像是网页错误HTML的开头部分,有的像'<'html>