// 加入收藏 função addFavorite () {if (document.all) {addToBookmark (window.location.href, document.title); } else if (window.sidebar) {addToBookmark (document.title, window.location.href); }} função addTookmark (url, title) {var ua = navegator.userAgent.tolowercase (); if (ua.indexOf ("msie 8")>-1) {external.addtofavoritesBar (url, title); // ie8} else {try {window.external.addfavorite (url, título); } catch (e) {try {window.sidebar.addpanel (title, url); // firefox} catch (e) {alert ("加入收藏失败 , 请使用 ctrl+d 进行添加"); }}} retorna false; }