获取当前IP的接口

https://api.ipify.org/

https://api.ipify.org/?format=json

https://api.ipify.org/?format=jsonp&callback=?

 

$.getJSON("https://api.ipify.org/?format=jsonp&callback=?&_=" + Math.random(), function (result) {
  console.log(result.ip);
});

posted @ 2019-06-11 16:50  瓜甜  阅读(7433)  评论(0编辑  收藏  举报