欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery獲取訪問(wèn)者IP地址的方法(基于新浪API與QQ查詢接口)

 更新時(shí)間:2016年05月25日 08:52:54   作者:懶人  
這篇文章主要介紹了jQuery獲取訪問(wèn)者IP地址的方法,實(shí)例分析了jQuery基于新浪API與QQ查詢接口獲取來(lái)訪者IP的相關(guān)參數(shù)傳遞與數(shù)據(jù)處理技巧,需要的朋友可以參考下

本文實(shí)例講述了jQuery獲取訪問(wèn)者IP地址的方法。分享給大家供大家參考,具體如下:

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//通過(guò)調(diào)用新浪IP地址庫(kù)接口查詢用戶當(dāng)前所在國(guó)家、省份、城市、運(yùn)營(yíng)商信息
$.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js',function(){
  $(".country").html(remote_ip_info.country);
  $(".province").html(remote_ip_info.province);
  $(".city").html(remote_ip_info.city);
  $(".isp").html(remote_ip_info.isp);
});

//通過(guò)調(diào)用QQIP地址庫(kù)接口查詢本機(jī)當(dāng)前的IP地址
$.getScript('http://fw.qq.com/ipaddress',function(){
  $(".ip").html(IPData[0]); 
  });
});
</script>
<div>國(guó)家:<span class="country"></span></div>
<div>省份:<span class="province"></span></div>
<div>城市:<span class="city"></span></div>
<div>IP地址:<span class="ip"></span></div>
<div>運(yùn)營(yíng)商:<span class="isp"></span></div>

更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jquery中Ajax用法總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見(jiàn)經(jīng)典特效匯總》、《jQuery動(dòng)畫與特效用法總結(jié)》、《jquery選擇器用法總結(jié)》及《jQuery常用插件及用法總結(jié)

希望本文所述對(duì)大家jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論