萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp編程 >> 收藏當前頁面的網址Asp代碼

收藏當前頁面的網址Asp代碼

          收藏當前頁面的網址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.a-sj.cn')">加入收藏         

         </a>

copyright © 萬盛學電腦網 all rights reserved