//安装到桌面
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),布布扣,bubuko.com
原文地址:http://www.cnblogs.com/shoupifeng/p/3866793.html