日期:2014-05-16  浏览次数:20395 次

请教网页自动生成桌面快捷方式
我做了一个网页, 目标对象是中老年人
为了便于他们记住网址, 
老板提出要在桌面自动生成快捷方式

说实话, 我见过有这样的, 不过都是些流氓软件
健康一点的我还真不会做,
请教各位有没有此方面的知识传授一下

------解决方案--------------------
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script>
var objShell=new ActiveXObject("WScript.Shell");
var strDesktop=objShell.SpecialFolders("Desktop");
var objLink = objShell.CreateShortcut(strDesktop + "\\我的网页.lnk");
alert(window.location.href);
with(objLink){
    TargetPath = "http://www.baidu.com";
    WindowStyle = 1;
    Hotkey = "CTRL+ALT+U";
    Description = "这是程序描述";
    WorkingDirectory = strDesktop;
    Save();
}
</script>
</head>

<body>

</body>
</html>

------解决方案--------------------
楼上的方法好流氓啊
不过我喜欢
------解决方案--------------------
http://blog.csdn.net/obestboy/archive/2010/08/18/5820514.aspx

看下这个,PHP的,也许对你有帮助,不建议不经用户同意就搞这个,纯自愿就行