我试图通过链接访问xml数据,但是当我尝试收到此错误时:
请求的资源上没有“Access-Control-Allow-Origin”标头。因此,不允许原点'null'访问。
我该如何解决这个问题?
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "https://www.veiligstallen.nl/veiligstallen.xml",
dataType: "xml",
succes: function (xml){
console.log("succeed");
});
});
</script>
</body>
</html>