<div class="codetitle"> <span><a style="CURSOR: pointer" data="99692" class="copybut" id="copybut99692" onclick="doCopy('code99692')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code99692"> <br><br><br><br><br><br><title> JS加入收藏夾</title> <br><br><script><BR>function addfavorite()<BR>{<BR> if (document.all)<> external.addFavorite('http://www.baidu.com','收藏夾');<BR> }<BR> else if (window.sidebar)<BR> <<BR> 百度一下', 'http://www.baidu.com', "");<BR> }<BR>}<BR></script><br><br><a href="#%20" onclick="addfavorite()">加入收藏! </a><br><br> </div>