JavaScript读取EXE文件的属性????

gxykdx2005 2006-10-12 12:42:12
请问各位高手:JavaScript能否读取客户端指定.exe文件的属性(创建时间和修改时间)?
...全文
213 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gxykdx2005 2006-10-17
  • 打赏
  • 举报
回复
D:\QQ\QQ2005.exe这样也不行
要D:\\QQ\\QQ2005.exe才行
mingxuan3000 2006-10-13
  • 打赏
  • 举报
回复
filespec要具体的路径,如
D:\QQ\QQ2005.exe
gxykdx2005 2006-10-13
  • 打赏
  • 举报
回复
读不出来呀!!!
我的代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function ShowFileAccessInfo(filespec)
{
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = f.Path.toUpperCase() + "<br>";
s += "Created: " + f.DateCreated + "<br>";
s += "Last Accessed: " + f.DateLastAccessed + "<br>";
s += "Last Modified: " + f.DateLastModified
return(s);
}
</script>
</head>

<body>
<script language="javascript">
document.write(ShowFileAccessInfo("QQ2005.exe"));
</script>
</body>
</html>
liufei8463 2006-10-12
  • 打赏
  • 举报
回复
楼上正解...
BlueDestiny 2006-10-12
  • 打赏
  • 举报
回复
function ShowFileAccessInfo(filespec)
{
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = f.Path.toUpperCase() + "<br>";
s += "Created: " + f.DateCreated + "<br>";
s += "Last Accessed: " + f.DateLastAccessed + "<br>";
s += "Last Modified: " + f.DateLastModified
return(s);
}

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧