收藏当前页面的网址asp教程代码
<%
function getip 获取ip
if requestservervariables("http_x_forwarded_for")=empty then
getip=requestservervariables("remote_addr")
else
getip=requestservervariables("http_x_forwarded_for")
end if
end function
responsewrite getip
%>
<script>
var hostname = locationhostname; //获取当前域名
var localurl = locationhref; //获取当前的url地址信息
</script>
<a href="#" onclick="thisstylebehavior=url(#default#homepage);windowexternaladdfavorite(localurlwwwasjcn)">加入收藏
</a>