the code is as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ajaxjson</title>
<script type="text/javascript" src="jquery-3.3.1.js"></script>
</head>
<body>
<button id="btn">ajax</button>
<script type="text/javascript">
$("-sharpbtn").click(function() {
$.ajax({
type : "get",
async: false,
url : "http://yunxtec.com/test/adlist.json",
dataType: "jsonp",
jsonp:"callback",
success : function(data) {
alert(data[0][1]);
},
error : function(r) {
alert("fail");
}
});
})
</script>
</body>
</html>
Screenshot of error message is as follows:
GET200
could you tell me what went wrong? Ask for advice