function addFavorite(url,title){
if(window.sidebar||window.opera)return true;
try{
window.external.AddFavorite(url,title);
}
catch(e){
alert("请按下 Ctrl + D 键将本站加入收藏。");
}
return false;
}
<a href="http://www.360qikan.com" title="360期刊网" rel="sidebar" οnclick="return addFavorite('http://www.360qikan.com','360期刊网');">加入收藏夹</a>
//搜索
<input name="q" type="text" class="search-keyword" id="search-keyword" value="在这里搜索..." οnfοcus="if(this.value=='在这里搜索...'){this.value='';}" οnblur="if(this.value==''){this.value='在这里搜索...';}" />