知识库

收藏当前页面的网址Asp代码

来源: 本站    类别: 知识库    日期: 2016/2/2

 

收藏当前页面的网址asp教程代码

<%
function getip   '获取ip
   if request.servervariables("http_x_forwarded_for")=empty then
      getip=request.servervariables("remote_addr")
   else
      getip=request.servervariables("http_x_forwarded_for")
   end if
end function

response.write getip
%>


<script>
var hostname = location.hostname;      //获取当前域名
var localurl = location.href;          //获取当前的url地址信息 
</script>
<a href="#" onclick="this.style.behavior='url(#default#homepage)';window.external.addfavorite(localurl,'www.cnhww.com')">加入收藏</a>



相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com