直接贴代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<title>Title</title>
</head>
<body>
<h1>当前城市:</h1><p id="curcity"></p>
<script>
console.log("city:"+remote_ip_info.city);
$("p#curcity").html(remote_ip_info.city);
</script>
</body>
</html>