当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
3 Star 0 Fork 0

musicyinchao / Dsg
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
city.html 970 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
musicyinchao 提交于 2017-05-09 21:31 . fsdfs
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>默认浏览器客户端IP定位查询当前用户所在城市</title>
<script type="text/javascript" src="http://pv.sohu.com/cityjson" charset="utf-8"></script>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
<script>
var citylocation=null;
var init = function() {
//获取 城市位置信息查询 接口
citylocation = new qq.maps.CityService({
complete : function(results){
alert(results.detail.name);
}
});
}
function geolocation_ip() {
var localIp = returnCitySN["cip"];
alert(localIp);
init();
//调用查询ip接口查询信息
citylocation.searchCityByIP(localIp);
}
geolocation_ip();
</script>
</head>
</html>
Java
1
https://gitee.com/yinchaomusic/Dsg.git
git@gitee.com:yinchaomusic/Dsg.git
yinchaomusic
Dsg
Dsg
master

搜索帮助