您的位置:首页 > 编程语言 > ASP

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

2008-08-27 08:29 267 查看
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")
%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: