// 加入收藏 fungsi addFavorite () {if (document.all) {addToBookmark (window.location.href, document.title); } else if (window.sideBar) {addToBookmark (document.title, window.location.href); }} fungsi addToBookmark (url, judul) {var ua = navigator.useragent.tolowercase (); if (ua.indexof ("msie 8")>-1) {external.addtofavoritesBar (url, title); // ie8} else {coba {window.external.addfavorite (url, title); } catch (e) {try {window.sideebar.addpanel (judul, url); // firefox} catch (e) {alert ("加入收藏失败 , 请使用 ctrl+d 进行添加"); }}} return false; }