Javascript添加到书签(FirefoxIE)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Javascript添加到书签(FirefoxIE)相关的知识,希望对你有一定的参考价值。
There is no standard for this at all - this just looks for the hooks that exist in IE and gecko-type browsers.See also http://msdn.microsoft.com/en-us/library/ms535926(VS.85).aspx and http://developer.mozilla.org/en/docs/DOM:window.sidebar
function addToBookmarks(url,title) { if (window.external && window.external.AddFavorite) window.external.AddFavorite(url,title); // IE4 and later else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,''); // Gecko/firefox } //use e.g. like: addToBookmarks(window.document.location, window.document.title);
以上是关于Javascript添加到书签(FirefoxIE)的主要内容,如果未能解决你的问题,请参考以下文章
JavaScript 在Javascript中创建添加到收藏夹/书签按钮