window.location.host 客户端IP
window.location.hostname 客户端机器名
window.location.pathname url的路径部分
window.location.href 完整的url
window.location.search url中?之后的信息
window.location.port url的端口号(默认为80)
window.location.hostname 客户端机器名
window.location.pathname url的路径部分
window.location.href 完整的url
window.location.search url中?之后的信息
window.location.port url的端口号(默认为80)
在浏览器地址栏写入
javascript:alert(window.location.host)
或
javascript:alert(window.location.hostname)
怎么显示的是 www.csdn.net? -显然不是客户端的机器名
<%
Response.Write(Request.Servervariables("REMOTE_ADDR"))
%>