获取当前网络的ip地址和城市

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

</body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript">
  document.write(returnCitySN["cip"]+','+returnCitySN["cname"])
</script>
</html>
 
百度也可以获取比较准确
 
 
 
 
posted @ 2021-07-28 10:46  Chen,ChunChang  阅读(178)  评论(0编辑  收藏  举报