^_^ 这是个不错的问题,看来我可以考虑把它加入FAQ了...首先,你要在FF浏览器的地址栏里输入:about:config  设置"signed.applets.codebase_principal_support"选项的值为true然后照下面的代码做就可以了:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>The setHomePage of Firefox</title>
</head><body>
<a href="#" target="_search" onclick="setHomePageInFF()">设为首页</a></p>
<script type="text/javascript">
function setHomePageInFF()
{
//author:猫猫(brothercat)
//date:2006.12.4  if(window.netscape)
  {
        try {  
          netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
        }  
        catch (e)  
        {  
          alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");  
        }
  }  var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
  prefs.setCharPref('browser.startup.homepage','http://www.91do.net/');
}
</script>
</body>
</html>
把http://www.91do.net改成你自己的网址