//设为首页 function sethome(obj, url) { try { obj.style.behavior = 'url(#default#homepage)'; obj.sethomepage(url); } catch (e) { if (window.netscape) { try { netscape.security.privilegemanager.enableprivilege("universalxpconnect"); } catch (e) { alert("抱歉,此操作被浏览器拒绝!\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'"); } } else { alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【" + url + "】设置为首页。"); } } } //收藏本站 function addfavorite(title, url) { try { window.external.addfavorite(url, title); } catch (e) { try { window.sidebar.addpanel(title, url, ""); } catch (e) { alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请使用ctrl+d进行添加"); } } } //保存到桌面 function todesktop(surl, sname) { try { var wshshell = new activexobject("wscript.shell"); var ourllink = wshshell.createshortcut(wshshell.specialfolders("desktop") + "\\" + sname + ".url"); ourllink.targetpath = surl; ourllink.save(); } catch (e) { alert("当前ie安全级别不允许操作!"); } }