<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js" type="text/ecmascript"></script>//引用新浪的js文件
<script type="text/javascript">
function getIpPlace() {
alert(remote_ip_info["city"])//remote_ip_info["city"]获取城市
} </script>