<html>
<span style="white-space:pre"> </span><head>
<span style="white-space:pre"> </span><title>
<span style="white-space:pre"> </span>JS增加收藏夹
<span style="white-space:pre"> </span></title>
<span style="white-space:pre"> </span></head>
<span style="white-space:pre"> </span><script>
<span style="white-space:pre"> </span>function addfavorite() {
<span style="white-space:pre"> </span>if (document.all) {
<span style="white-space:pre"> </span>window.external.addFavorite('http://www.njxblog.com', '收藏夹');
<span style="white-space:pre"> </span>} else if (window.sidebar) {
<span style="white-space:pre"> </span>window.sidebar.addPanel('小池编程的博客', 'http://www.njxblog.com', "");
<span style="white-space:pre"> </span>}
<span style="white-space:pre"> </span>}
<span style="white-space:pre"> </span></script>
<span style="white-space:pre"> </span><body>
<span style="white-space:pre"> </span><a href="#" onclick="addfavorite()">
<span style="white-space:pre"> </span>增加收藏!
<span style="white-space:pre"> </span></a>
<span style="white-space:pre"> </span></body>
</html>

转载:小池编程的博客 » js增加收藏

05-11 13:23