[英]Uncaught Reference Error: callback not defined
I want to get the IP address of the machine with javascript ajax. 我想用javascript ajax获取机器的IP地址。
I used the site https://geoip-db.com/jsonp/ . 我使用了网站https://geoip-db.com/jsonp/ 。 with ajax but the error keeps getting up. 与ajax但错误不断起来。
jQuery.ajax({
url: 'https://geoip-db.com/jsonp/',
dataType: 'jsonp'
});
The error message is: 错误消息是:
Uncaught ReferenceError: callback is not defined at ?callback=jQuery19009023082782456009_1560194259394&_=1560194259395:1 未捕获的ReferenceError:回调未定义在?callback = jQuery19009023082782456009_1560194259394&_ = 1560194259395:1
Instead of jQuery.ajax({ url: 'https://geoip-db.com/jsonp/', dataType: 'jsonp' });
而不是jQuery.ajax({ url: 'https://geoip-db.com/jsonp/', dataType: 'jsonp' });
Use jQuery.ajax({ url: 'https://geoip-db.com/json/', dataType: 'json' });
使用jQuery.ajax({ url: 'https://geoip-db.com/json/', dataType: 'json' });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.