繁体   English   中英

http://api.easyjquery.com/ips/没有设置值

[英]http://api.easyjquery.com/ips/ didn't retern value

HTML:

<div class=iplookup>23.25.49.250</div>;
<div class=iplookup>188.2.50.62</div>;

jQuery的:

$("div").mouseup(function () {
    IP = $(this).text();
    $.getJSON("http://api.easyjquery.com/ips/", {
        IP: IP
    }, function (data) {
        alert("XXX");
        alert(data.continentName + "\n" + data.countryName + " " + data.cityName);
        $(this).append("=" + data.countryName + "," + data.cityName);

    });

});

此代码有什么问题? 为什么未显示alert()

该服务未返回跨域调用所需的JSONP。 有关类似问题,请参见此处

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM