复主代码 代码如下: <br>function addCookie() <br>{ <br>if (document.all) <br>{ <br>window.external.addFavorite('http://www.jb51.net','脚本之家' ); <br>} <br>else if (window.sidebar) <br>{ <br>window.sidebar.addPanel('脚本之家', 'http://www.jb51.net', ""); <br>} <br>} <br><br>function setHomepage() <br>{ <br>if (document.all) <br>{ <br>document.body.style.behavior='url(# 기본#홈페이지)'; <br>document.body.setHomePage('http://www.jb51.net'); <br><br>} <br>else if (window.sidebar) <br>{ <br>if(window.netscape) <br>{ <br>시도 <br>{ <br>netscape.security.PrivilegeManager .enablePrivilege("UniversalXPConnect"); <br>} <br>catch (e) <br>{ <br><br>} <br>} <br>var prefs = Components.classes['@mozilla.org/preferences-service;1']. getService(Components.interfaces.nsIPrefBranch); <br>prefs.setCharPref('browser.startup.homepage','http://www.jb51.net'); <br>} <br>} <br> <양식> 设为首页 添加收藏