通过ip地址 获取ip地址所在地区的经纬度 通过ip地址 获取ip地址所在地区的经纬度?怎么弄的?貌似要借助google地图? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 刚刚讨论过:http://bbs.csdn.net/topics/390272529但它解析到的地址并不详细。<script type="text/javascript"> function jsShow(address){ var geocoder = new google.maps.Geocoder(); if(geocoder){ geocoder.geocode({'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var GeoCode = ((results[0].geometry.location).toString().replace(/[()]/g, '')).split(",",2); var lat = parseFloat(GeoCode[0]); var lng = parseFloat(GeoCode[1]); var result=lat+','+lng; alert('最后的结果为:'+result); return result; } }) } } function (){ var ip=document.getElementById('info').value; $.getScript("http://whois.pconline.com.cn/jsFunction.jsp?callback=jsShow&ip='"+ip+"'"); }</script>输入ip地址:<input id="info" type="text" value="61.188.38.99"> <input type="button" value="查询 " onclick="()"> ztree 怎样生成银行自动取款机一样的几个数字触摸按钮 easyui Dialog扩展建多个窗口问题 我如何用javascript获取object 中的PARAM值?? 如何禁止鼠标左键? 鼠标在表格上的动作响应问题 能不能在表格居中时使表格内层绝对定位,在线等! 请问当鼠标移到一张图片上时怎么显示小手?前提是不对这张图片进行超级链接。 easyui datagrid combobox js 如何获取gif文件的时长? 求教 急求!!!
function jsShow(address){
var geocoder = new google.maps.Geocoder();
if(geocoder){
geocoder.geocode({'address': address }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var GeoCode = ((results[0].geometry.location).toString().replace(/[()]/g, '')).split(",",2);
var lat = parseFloat(GeoCode[0]);
var lng = parseFloat(GeoCode[1]);
var result=lat+','+lng;
alert('最后的结果为:'+result);
return result;
}
})
}
}
function (){
var ip=document.getElementById('info').value;
$.getScript("http://whois.pconline.com.cn/jsFunction.jsp?callback=jsShow&ip='"+ip+"'");
}
</script>
输入ip地址:<input id="info" type="text" value="61.188.38.99">
<input type="button" value="查询 " onclick="()">