代码如下
$.ajax({
type: "POST",
url: "http://nw.ycvw.net/nw.php?m=vote&z=132&formhash=87da4703",
data: {
latitude: 0,
longitude: 0,
verify: 0
},
dataType: "jsonp",
success: function(str) {
},
error: function(err) {
alert("发生错误,请刷新后重试!");
}
});
报错啦
既然是跨域了,首先得确认下后端是否做了跨域的处理,如果不允许跨域,那么请求肯定是错误