JS | Get IP Info Via Jquery

http://ip-api.com/json/」

1
2
3
4
5
6
7
8

var getParams = { };
$.getJSON ("http://ip-api.com/json/",getParams,
function (data, textStatus, jqXHR) {
$.each(data, function(k, v) {
$("#get-json-msg").append(k+":"+v+"<br>");
});
}).fail (function (jqXHR, textStatus, errorThrown) { });