jQuery 如何获取浏览器所在的IP地址


   
 $(function () {
    $("#btnGetIP").click(function () {
        var jqxhr = $.getJSON("http://jsonip.appspot.com?callback=?",
            function (data) {
                alert(data.ip);
            })
        .error(function () { alert("error"); })
    });
});
Tags: 

延伸阅读

最新评论

发表评论