Home  >  Article  >  Web Front-end  >  原生JS实现加入收藏夹的代码_javascript技巧

原生JS实现加入收藏夹的代码_javascript技巧

WBOY
WBOYOriginal
2016-05-16 17:18:581170browse
复制代码 代码如下:



JS加入收藏夹

<script><BR>function addfavorite()<BR>{<BR> if (document.all)<BR> {<BR> window.external.addFavorite('http://www.baidu.com','收藏夹');<BR> }<BR> else if (window.sidebar)<BR> {<BR> window.sidebar.addPanel('百度一下', 'http://www.baidu.com', "");<BR> }<BR>}<BR></script>

加入收藏!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn