设为首页加入收藏代码


设为首页代码  

1.图片链接


<a style="cursor:hand" onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('www.csashd.com');">
<img width=16 height=16 border=0 src="images/Logo.gif">
<u> 设为首页</u></a> 


2.文字型:


<a onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.csashd.com');" href="#">设为首页</a> 


3.按钮型:


<input TYPE="button" VALUE=" 设为首页 " onclick="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.csashd.com');" href="#"> 


4.鼠标指向时提示设为首页


<A href="http://www.qipao8.com/" onmouseover="this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.csashd.com');" target="_blank">设为首页</A> 


加入收藏代码1.


<a href="#" onclick="javascript:window.external.AddFavorite('http://www.csashd.com','长沙爱尚花都')" title="收藏本站到你的收藏夹"><font size="-1" color="#FFE09E">收藏本站</font></a>


2.


<a href="javascript:void(0);" onClick="window.external.AddFavorite(document.location.href,document.title)">加入收藏</a>
加入频道
<a href="typhoon.cdf")>加入频道</a>


邮件链接


<a href="mailto:[email protected]">与我联系</a>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>加为收藏_IT有道(www.ityoudao.com)</title>
</head>
<body>
<a href="javascript:;" onclick="javascript:addfavor('http://www.baidu.com','IT有道');">加为收藏</a>
<script language="javascript">
function addfavor(url,title) {
    if(confirm("网站名称:"+title+"\n网址:"+url+"\n确定添加收藏?")){
        var ua = navigator.userAgent.toLowerCase();
        if(ua.indexOf("msie 8")>-1){
            external.AddToFavoritesBar(url,title,'IT有道');//IE8
        }else{
            try {
                window.external.addFavorite(url, title);
            } catch(e) {
                try {
                    window.sidebar.addPanel(title, url, "");//firefox
                } catch(e) {
                    alert("加入收藏失败,请使用Ctrl+D进行添加");
                }
            }
        }
    }
    return false;
}
</script>
</body>
</html>




你可能感兴趣的:(html,XHTML,firefox)