<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>使用搜狐接口获取客户端IP地址</title>
</head>
<body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript">
document.write(returnCitySN["cip"]+','+returnCitySN["cname"])
</script>
</body>
</html>
效果图:
本文介绍如何通过搜狐接口获取客户端的IP地址,并展示了一个简单的HTML和JavaScript实现的例子。
2683

被折叠的 条评论
为什么被折叠?



