搜狐IP地址搜索接口(默认GBK ):http://pv.sohu.com/cityjson
搜狐IP地址搜索接口(可设置代码) http://pv.sohu.com/cityjson? ie=utf-8
使用搜狐接口demo:
title$(function ) )
$('#ip ' ).html(returncitysn['CIP'];
() )
//取得城市ajax
$.Ajax({ ()
URL : ' http://API.map.Baidu.com/location/IP? ak=ia6HfFL660Bvh43exmH9LrI6',
类型: '开机自检',
dataType: 'jsonp ',
success :功能(data ) {
$('#city ' ).html (data.content.address _ detail.province ',' data.content.address _ detail.city ) )。
}
);
() )