http://2011.cma.gov.cn/qxxw/y.
I use jquery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="http://127.0.0.1/jquery-3.3.1.js"></script>
<script>
function Ajax( ) {
var url = "http://2011.cma.gov.cn/qxxw/yw/index_228.xml";
$.ajax(url, {
type:"GET",
dataType: "jsonp",
crossDomain: true,
success:function(data){
alert(data);
},
error: function (e) {
alert("error");
}
});
};
</script>
<input type="button" value="show content" onclick="Ajax();" />
</body>
</html>
Why did I report an error and how to correct it?