收藏本站
<span style="CURSOR: hand" onClick="window.external.addFavorite('http://www.webjx.com','網頁教學網')" title="網頁教學網">收藏本站</span>
或:
<Script Language="JavaScript">
function bookmarkit()
{
window.external.addFavorite('http://你的網址','你的網站名稱')
}
if (document.all)document.write('<a href="#" onClick="bookmarkit()">加入收藏夾</a>')
</Script>
通用的加入收藏夾<script type="text/javascript">
// <![CDATA[
function bookmark(){
var title=document.title
var url=document.location.href
if (window.sidebar) window.sidebar.addPanel(title, url,"");
else if( window.opera && window.print ){
var mbm = document.createElement('a');
mbm.setAttribute('rel','sidebar');
mbm.setAttribute('href',url);
mbm.setAttribute('title',title);
mbm.click();}
else if( document.all ) window.external.AddFavorite( url, title);
}
// ]]>
</script>
<a href="javascript:bookmark()">加入收藏夾</a>
在IE6-7. FF2.0 OP9.0中測試通過
設為首頁<span onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.webjx.com');" style="CURSOR: hand">設為首頁</span>
返回頁首<img src="/imgs/top.gif" onClick="javascript:document.location='#top'" style="cursor:pointer;">
在原視窗中開啟onclick="location.href='http://www.webjx.com;" style="cursor:pointer;"
在新視窗中開啟onclick="location.href='http://www.webjx.com';" style="cursor:pointer;"
前進<INPUT name=Submit onclick=history.go(1) type=submit value=前進>
後退<INPUT name=Submit2 onclick=history.go(-1) type=submit value=後退>
關閉當前視窗<a href="/"onClick="javascript:window.close();return false;">關閉視窗</a>
列印<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>
高亮顯示的行onMouseOut="this.bgColor='';this.style.color='#000'" onMouseOver="this.bgColor='highlight';this.style.color='#fff'"