如何用js获取客户端IP地址? 如何用js获取客户端IP地址? 请高手指教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 安全问题,直接获取不到。可以用script加载一个动态提供js语法输出的ip地址的动态页就可以实现了<script type="text/javascript" src="http://www.coding123.net/getip.ashx?js=1"></script><script>alert(ip)</script> 什么意思不是很明白?请高手指点 我做了个在线调查 需要获取下参与人员的ip地址 ,用来保证一个ip地址只能提交一次 保存到html里试,这个是获取用户IP,打开一次你往数据库写一次IP。以后判断IP存在就不让提交不得了<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN"> <head> <script language="Javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script language="Javascript" type="text/javascript" src="http://api.easyjquery.com/easyjquery.js"></script> <title>TYGF</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head><body></body><script> GetIP(); function my_callback2(json) { alert(json.IP); } function GetIP(){ EasyjQuery_Get_IP("my_callback2","full"); // full version } </script></html> 直接在后台用request.servervariables("REMOTE_ADDR")多好 这个要通过服务器的,你也可以通过ajax去服务器端获取吧。 SWFUPLOAD组件的问题 jHtmlArea HTML编辑器问题 如何让 图片在编辑器中不可移动及调整尺寸? onmouseover怎么只执行一次?? js解析xml文件问题 声明的javascirpt自定义对象为什么有错 限制文本框输入为整数或为.5的小数,如:2,1.5,0.5,3.... 有关页面显示的问题,急用 180个javascript的效果,不看白不看罗!!!!! Error: Cannot find module 'extract-text-webpack-plugin' 求教easyUI怎么获取MVC后台生成的数据 急需!帮帮忙吧
<script type="text/javascript" src="http://www.coding123.net/getip.ashx?js=1"></script>
<script>
alert(ip)
</script>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
<script language="Javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script language="Javascript" type="text/javascript" src="http://api.easyjquery.com/easyjquery.js"></script>
<title>TYGF</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
</body>
<script>
GetIP();
function my_callback2(json) {
alert(json.IP);
}
function GetIP(){
EasyjQuery_Get_IP("my_callback2","full"); // full version
}
</script>
</html>