標籤:style blog http color java io 檔案 ar art
<a href="javascript:window.external.addFavorite(‘http://www.vkesoft.com‘,‘你的網站名字‘)"> <span style="font-size: 10pt">加入收藏</span></a><a href="Default.aspx" onclick="this.style.behavior=‘url(#default#homepage)‘;this.setHomePage(‘http://www.vkesoft.com‘)"><span style="font-size: 10pt">設為首頁</span></a>
1:設為首頁<a href="javascript:void(0);" id="setHomePage" onclick="this.style.behavior=‘url(#default#homepage)‘;this.setHomePage(‘http://www.vkesoft.com/‘);return(false);" style="behavior:url(#default#homepage);">設為首頁</a> 2:收藏本站<span style="CURSOR:hand" onclick="window.external.addFavorite(‘http://www.vkesoft.com‘,‘開寶網‘)">收藏本站</span>3:不同瀏覽器,收藏的js代碼有區別,比如IE和firefox等。<a href=http://www.vkesoft.com onclick="window.external.addFavorite(this.href,this.title);return false;" title=‘vkesoft‘ rel="sidebar">加入收藏</a>
所有瀏覽器通用的js添加收藏夾代碼<script>
function addfavorite()
{
if (document.all)
{
window.external.addFavorite(‘http://www.XXX.com‘,‘XXX);
}
else if (window.sidebar)
{
window.sidebar.addPanel(‘XXX, ‘http://www.XXX.com‘, "");
}
}
</script>
<a href="#" onclick="addfavorite()">XXX</a>
開啟,另存新檔,屬性,列印"等14個JS代碼
■重新整理■
■匯入收藏■
■匯出收藏■
■整理收藏夾■
■查看原檔案■
■語言設定■
■開啟■
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=開啟>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■另存新檔■
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存新檔><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■屬性■
<input name=Button onClick=document.all.WebBrowser.ExecWB(10,1) type=button value=屬性><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■列印■
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=列印><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■版面設定■
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=版面設定><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
■重新整理■
<input type=button value=重新整理 name=refresh onclick="window.location.reload()">
■匯入收藏■
<input type="button" name="Button" value="匯入收藏夾" onClick=window.external.ImportExportFavorites(true,);>
■匯出收藏■
<input type="button" name="Button3" value="匯出收藏夾" onClick=window.external.Imp
.net中添加收藏和設為首頁的代碼(轉)