// 加入收藏 function addFavorite () {if (document.all) {addTobookmark (window.location.href, document.title); } else if (window.sidebar) {addtobookmark (document.title, window.location.href); }} функция addTobookmark (url, title) {var ua = navigator.useragent.tolowercase (); if (ua.indexof ("msie 8")>-1) {External.AdtofavoritesBar (url, title); // ie8} else {try {window.external.addfavorite (url, title); } catch (e) {try {window.sidebar.addpanel (title, url); // firefox} catch (e) {alert ("加入收藏失败 , 请使用 ctrl+d 进行添加"); }}} вернуть false; }