Home  >  Article  >  Web Front-end  >  A small example of jQuery getting the IP address of the browser_jquery

A small example of jQuery getting the IP address of the browser_jquery

WBOY
WBOYOriginal
2016-05-16 17:16:441176browse
Copy code The code is as follows:

$(function () {
$("#btnGetIP" ).click(function () {
var jqxhr = $.getJSON("http://jsonip.appspot.com?callback=?",
function (data) {
                alert(data.ip );
                       )
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn