<script type="text/javascript">
Funktion addfavorit (Surl, Stitle)
{
versuchen
{
window.external.addfavorite (Surl, Stitle);
}
fangen (e)
{
versuchen
{
window.sideBar.addpanel (Stitle, Surl, "");
}
fangen (e)
{
alert ("加入收藏失败 , 请使用 Strg+d 进行添加");
}
}
}
Funktion Sethome (obj, vrl) {
versuchen{
Obj.Style.Behavior = 'url (#Standard#homepage)'; obj.sethomepage (VRL);
}
fangen(e){
if (window.netscape) {
versuchen {
netscape.security.privileGemanager.EnablePrivilege ("UniversalxPConnect");
}
fangen (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', vrl);
}
}
}
</script>
<a href = "JavaScript: Addfavorite ('http://www.devdao.com', '网站制作爱好者')"> 加入收藏 </a>