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);
}

解决方案 »

  1.   

    读不出来呀!!!
    我的代码如下:<!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>
      

  2.   

    filespec要具体的路径,如
    D:\QQ\QQ2005.exe
      

  3.   

    D:\QQ\QQ2005.exe这样也不行
    要D:\\QQ\\QQ2005.exe才行