我在一个网站的页面上请求另一个网站的一个链接,提示CORS,这个怎么解决?
rurl = "http://m.xxxx.com/Tools/add.ashx?title=" + ip+"-"+title + "&tel1=" + tel1 + "&come=" + come + "&content=" + content + "";
$.ajax({
url: rurl,
type: "get",
dataType: "json",
timeout: "60000",
success: function (data) {
if (data == 0) {
alert("留言成功");
return true;
}
else (data == 1)
{
alert("留言失败");
return false;
}
},
domain-a.com
站访问domain-b.com
站提示 CORS 就是正常解决跨域问题的解决方式。domain-a.com
增加跨域头;domain-a.com
;跨源资源共享(CORS) - HTTP | MDN