|
@@ -6,29 +6,31 @@
|
|
<h1>Hello, 来自{{ ip }} 的亲:</h1>
|
|
<h1>Hello, 来自{{ ip }} 的亲:</h1>
|
|
<h3>{{ ipaddr }}</h3> <br><br><br>
|
|
<h3>{{ ipaddr }}</h3> <br><br><br>
|
|
|
|
|
|
-<div><input id="name" type="text">
|
|
|
|
|
|
+
|
|
|
|
+{% else %}
|
|
|
|
+ <h1>Hello World!</h1>
|
|
|
|
+{% endif %}
|
|
|
|
+
|
|
|
|
+<div>IP/域名: <input id="name" type="text">
|
|
<input type="button" id="btn" value="提交"></div>
|
|
<input type="button" id="btn" value="提交"></div>
|
|
|
|
|
|
<script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
|
<script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
|
<script>
|
|
<script>
|
|
- function enter() {
|
|
|
|
- var event = arguments.callee.caller.arguments[0] || window.event;
|
|
|
|
- if (event.keyCode == 13) {
|
|
|
|
- jump_url()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
$("#btn").click(function () {
|
|
$("#btn").click(function () {
|
|
jump_url()
|
|
jump_url()
|
|
})
|
|
})
|
|
function jump_url(params) {
|
|
function jump_url(params) {
|
|
var name = $("#name").val();
|
|
var name = $("#name").val();
|
|
const url = window.location.href;
|
|
const url = window.location.href;
|
|
- window.location.href = url + name
|
|
|
|
|
|
+ window.location.href = '/ip/' + name
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<br><br><br><br><br><br>
|
|
<br><br><br><br><br><br>
|
|
|
|
|
|
-本WebAPI支持IP城市定位和域名查IP定位,同时支持命令行查询
|
|
|
|
|
|
+本WebAPI支持IP城市定位和域名查IP定位,同时支持命令行查询<br>
|
|
|
|
+<br>github源码:<a href="https://github.com/hongwenjun/ip">https://github.com/hongwenjun/ip</a>
|
|
|
|
+<br>
|
|
|
|
+<br>docker镜像:<a href="https://hub.docker.com/r/hongwenjun/ip">https://hub.docker.com/r/hongwenjun/ip</a>
|
|
<h3>搭建WebAPI参考文章</h3>
|
|
<h3>搭建WebAPI参考文章</h3>
|
|
<a href="https://262235.xyz/index.php/archives/342/">Python网络开发简单的IP城市定位WebAPI</a>
|
|
<a href="https://262235.xyz/index.php/archives/342/">Python网络开发简单的IP城市定位WebAPI</a>
|
|
<p>
|
|
<p>
|
|
@@ -40,7 +42,3 @@ curl https://262235.xyz/ip/ # 命令行 URL 要带 /
|
|
curl https://262235.xyz/ip/8.8.8.8 # 查询自定义 IP 定位
|
|
curl https://262235.xyz/ip/8.8.8.8 # 查询自定义 IP 定位
|
|
|
|
|
|
curl https://262235.xyz/ip/github.com # 按域名查 IP 定位
|
|
curl https://262235.xyz/ip/github.com # 按域名查 IP 定位
|
|
-
|
|
|
|
-{% else %}
|
|
|
|
- <h1>Hello World!</h1>
|
|
|
|
-{% endif %}
|
|
|