当前位置: 代码迷 >> 综合 >> 用ASP代码得到客户端IP和当前地址
  详细解决方案

用ASP代码得到客户端IP和当前地址

热度:23   发布时间:2024-01-19 23:49:48.0

1、得到客户端IP

<%myip=Request.ServerVariables("Remote_Addr")%>

2、得到当前地址

以下为引用的内容:
<script>
document.write(this.location.href);
</script>

3、写入asp

以下为引用的内容:

<input type=hidden id=aspVar>
<script>
aspVar.value=location.href
</script>
------------------
<%
dim theAddress
thAddress=request.form("aspVar")
%>

  相关解决方案