首页 > 从网页向浏览器添加书签可以实现吗?

从网页向浏览器添加书签可以实现吗?

比如,在网页上有一个button,点击button自动添加书签,可以实现吗?是否需要向用户申请许可?


可以用js,贴个伪代码

var domain="http://xxxx.com";
var description='xxxxxxx';
try{//IE
  window.external.AddFavorite(domain,description);
}catch(e){//FF
  window.sidebar.addPanel(description,domain,"");
};

IE收藏可以,chrome不行,可以提示ctrl+D

【热门文章】
【热门文章】