码迷,mamicode.com
首页 > 编程语言 > 详细

JavaScript -- FileSystemObject

时间:2014-05-19 07:56:43      阅读:423      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   c   java   

-----056-FileSystemObject.html-----

bubuko.com,布布扣
 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="content-type" content="text/html; charset=utf-8">
 5     <title>标题</title>
 6 </head>
 7 <body>
 8 <script type="text/javascript">
 9     fso = new ActiveXObject("Scripting.FileSystemObject");
10     document.write("<ol><li>" + fso.getDrive(fso.getDriveName("c://///")).Path);
11     document.write("<li>" + fso.getDrive(fso.getDriveName("d:")).Path);
12     document.write("<li>" + fso.getDrive(fso.getDriveName("e:/")).Path);
13     document.write("<li>" + fso.getDrive(fso.getDriveName("f:\\jjj000")).Path);
14     document.write("<li>" + fso.getDrive(fso.getDriveName("r:\\\\\\\\")).Path + "</ol><br/>");
15     s = "<ol>";
16     for(drive=new Enumerator(new ActiveXObject("Scripting.FileSystemObject").Drives); !drive.atEnd(); drive.moveNext())
17     {
18         s += "<li>驱动器号:" + drive.item().DriveLetter + "<br/>";
19         s += "驱动器卷标:" + drive.item().VolumeName + "<br/>";
20         s += "驱动器类型:" + drive.item().DriveType + "<br/>";
21         s += "驱动器文件系统:" + drive.item().FileSystem + "<br/>";
22         s += "驱动器就绪状态:" + drive.item().IsReady + "<br/>";
23         s += "驱动器路径:" + drive.item().Path + "<br/>";
24         s += "驱动器根文件夹:" + drive.item().RootFolder + "<br/>";
25         s += "驱动器序列号:" + drive.item().SerialNumber + "<br/>";
26         s += "驱动器共享名:" + drive.item().ShareName + "<br/>";
27         s += "驱动器总容量:" + drive.item().TotalSize/1073741824 + " GB<br/>";
28         s += "驱动器可用空间:" + drive.item().AvailableSpace/1073741824 + " GB<br/>";
29         s += "驱动器空闲空间:" + drive.item().FreeSpace/1073741824 + " GB<br/><br/>";
30     }
31     document.write(s);
32     function sp(n)

33     {
34         var s = "";
35         for(var i=0; i<n; i++)
36         {
37             s += "&nbsp;";
38         }
39         return s;
40     }
41 </script>
42 </body>
43 </html>
bubuko.com,布布扣
bubuko.com,布布扣
 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="content-type" content="text/html; charset=utf-8">
 5     <title>标题</title>
 6 </head>
 7 <body>
 8 <script type="text/javascript">
 9     fso = new ActiveXObject("Scripting.FileSystemObject");
10     document.write("<ol><li>" + fso.getDrive(fso.getDriveName("c://///")).Path);
11     document.write("<li>" + fso.getDrive(fso.getDriveName("d:")).Path);
12     document.write("<li>" + fso.getDrive(fso.getDriveName("e:/")).Path);
13     document.write("<li>" + fso.getDrive(fso.getDriveName("f:\\jjj000")).Path);
14     document.write("<li>" + fso.getDrive(fso.getDriveName("r:\\\\\\\\")).Path + "</ol><br/>");
15     s = "<ol>";
16     for(drive=new Enumerator(new ActiveXObject("Scripting.FileSystemObject").Drives); !drive.atEnd(); drive.moveNext())
17     {
18         s += "<li>驱动器号:" + drive.item().DriveLetter + "<br/>";
19         s += "驱动器卷标:" + drive.item().VolumeName + "<br/>";
20         s += "驱动器类型:" + drive.item().DriveType + "<br/>";
21         s += "驱动器文件系统:" + drive.item().FileSystem + "<br/>";
22         s += "驱动器就绪状态:" + drive.item().IsReady + "<br/>";
23         s += "驱动器路径:" + drive.item().Path + "<br/>";
24         s += "驱动器根文件夹:" + drive.item().RootFolder + "<br/>";
25         s += "驱动器序列号:" + drive.item().SerialNumber + "<br/>";
26         s += "驱动器共享名:" + drive.item().ShareName + "<br/>";
27         s += "驱动器总容量:" + drive.item().TotalSize/1073741824 + " GB<br/>";
28         s += "驱动器可用空间:" + drive.item().AvailableSpace/1073741824 + " GB<br/>";
29         s += "驱动器空闲空间:" + drive.item().FreeSpace/1073741824 + " GB<br/><br/>";
30     }
31     document.write(s);
32     function sp(n)
33     {
34         var s = "";
35         for(var i=0; i<n; i++)
36         {
37             s += "&nbsp;";
38         }
39         return s;
40     }
41 </script>
42 </body>
43 </html>
bubuko.com,布布扣

bubuko.com,布布扣

JavaScript -- FileSystemObject,布布扣,bubuko.com

JavaScript -- FileSystemObject

标签:style   blog   class   code   c   java   

原文地址:http://www.cnblogs.com/baijifeilong/p/3732257.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!