js获取本机的外网/广域网ip地址完整源码

时间:2013-08-12    点击:129   
完整源代码:
复制代码 代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>客户端外网IP-本站</title>
</head>
<body>
您的IP地址是:<span id="keleyivisitorip"></span>
<script type="text/javascript" src="http://tool.keleyi.com/ip/visitoriphost/"></script>
</body>
</html>

效果如下:

您的IP地址是:114.235.53.54

也可到这里查看效果:
http://tool.keleyi.com/ip/wodeip.htm

使用方法:

一、把这个 <span id="keleyivisitorip"></span> 放到源代码中要显示IP地址的位置

二、然后在源代码的</body>前输入:<script type="text/javascript" src="http://tool.keleyi.com/ip/visitoriphost/"></script>
让元素在网页中可拖动示例代码
IE、FF、Chrome浏览器中的JS差异介绍
JavaScript的Module模式编程深入分析
js setTimeout 参数传递使用介绍
删除select中所有option选项jquery代码
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved