復制代碼 代碼如下:
<script type="text/javascript">
function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
</script> 頁面使用:<a href=javascript:addBookmark('','http://www.jb51.net/')>
添加到收藏</a>