$(".check_mobile").click(function(){
var mobile = $('.mobile').val();
$.getJSON("http://www.test.com/user.php?mobile="+mobile+"&format=json&jsOncallback=?", function(data){
if (data.succ == 1) {
var html = "";
$(".r_m").append(html);
}
});
});
XMLHttpRequest cannot load ''. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' ' is therefore not allowed access.
如果少了 echo "{$_GET['jsoncallback']}({$b})"; 代码
在谷歌浏览器中:Uncaught SyntaxError: Unexpected token :
在火狐浏览器中:SyntaxError: missing ; before statement