<%
//c#的作法
//客户端IP:cIP
string cIP=HttpContext.Current.Request.UserHostAddress.Trim();
//服务器端IP:sIP;
string sIP=Request.ServerVariables.Get("Local_Addr").ToString();
%>
<script>
//客户端IP:cip;
var obj = new ActiveXObject("rcbdyctl.Setting");
var cip = obj.GetIPAddress;
//服务器端IP:sip;
var sip=location.host;
</script>

另外还有其它(c#)
客户端ip:
Request.ServerVariables.Get("Remote_Addr").ToString();
客户端主机名:
Request.ServerVariables.Get("Remote_Host").ToString();
客户端浏览器IE:
Request.Browser.Browser;
客户端浏览器 版本号:
Request.Browser.MajorVersion;//
客户端操作系统:
Request.Browser.Platform;
服务器名:
Request.ServerVariables.Get("Server_Name").ToString();

相关文章:

  • 2022-01-15
  • 2021-06-09
  • 2021-09-04
  • 2021-11-28
  • 2021-12-05
  • 2022-01-26
  • 2022-02-28
猜你喜欢
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案