100分,100分,100分,求JS获取“客户端”的“桌面”位置,高手请进,100分,100分,100分
我原来是想在客户桌面上生成“快捷图标的”,在CSDN求了一段代码,可是发现找不到客户的“桌面位置”,所以特来请高人,强人,来帮助我一下。
<html>
<body>
<script language= "javascript ">
var url = "http://www.baidu.com ";
var lnk = "测试的结果 ";
var fso = new ActiveXObject( "Scripting.FileSystemObject ");
var shell = new ActiveXObject( "WScript.Shell ");
//var DesktopPath = WshShell.SpecialFolders( "Desktop ");
var DesktopPath = "E://Documents and Settings//jsdesk//桌面 ";
if(!fso.FolderExists(DesktopPath))
{
fso.CreateFolder(tagFolder);
//alert( "Create success! ");
}
if(!fso.FileExists(DesktopPath + "// "+lnk+ ".lnk "))
{
var link = shell.CreateShortcut(DesktopPath + "// "+lnk+ ".lnk ");
link.Description = "用JS生成客户端快捷方式 ";
link.TargetPath = url;
link.WindowStyle = 1;
&