新手求助web api跨域问题
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>搜索</title>
<meta charset="utf-8" />
</head>
<body>
<script src='jquery-1.12.2.js'></script>
<script>
$(document).ready(function () {
$("#Button1").click(function () {
//$.get('http://res.chinacloudsites.cn/list', function (data) {
// alert('1');
// //console.log(data);
// //$('#TextArea1').html(data);
//});
//$.get('http://res.chinacloudsites.cn/list',{keyword:"轻音"},'JSONP')
// .success(function () { alert("success") })
// .error(function () { alert("error") })
// .complete(function () { alert("error") });
$.ajax({
url: "http://res.chinacloudsites.cn/list?keyword='轻音'",
type: 'GET',
Datatype: 'JSONP',
//success: function (data) { alert("success") }
}).success(function () { alert("success"); }).done(function () { alert("success"); }).error(function (XMLHttpRequest, textStatus, errorThrown) { alert("error"); })
});
});
</script>
<input id="Text1" type="text" /><input id="Button1" type="button" value="查询" /><input id="Button2" type="button" value="重置" />
<textarea id="TextArea1" rows="2" cols="20"></textarea>
</body>
</html>
这个执行后总是调用error的操作,求帮忙看下,返回的是200,但是还是提示跨域