Drives 属性
时间:2007-12-27 来源:不详 作者:林子
返回一个 Drives 集合,包含了本地机器上所有可用的 Drive 对象。
织梦内容管理系统
object.Drives
内容来自dedecms
object 应为 FileSystemObject 。 织梦内容管理系统
说明
可移动媒体的驱动器不需要插入媒体就可以出现在 Drives 集合中。 本文来自织梦
可以通过 Enumerator 对象和 for 语句来逐个引用 Drives 集合中的成员:
本文来自织梦
function ShowDriveList() {
var fso, s, n, e, x;
fso = new ActiveXObject("Scripting.FileSystemObject");
e = new Enumerator(fso.Drives);
s = "";
for (; !e.atEnd(); e.moveNext())
{
x = e.item();
s = s x.DriveLetter;
s = " - ";
if (x.DriveType == 3)
n = x.ShareName;
else if (x.IsReady)
n = x.VolumeName;
else
n = "[
驱动器未就绪]";
s =n "<br>";
}
return(s);
} dedecms.com
请参阅
Drives 集合 | Files 属性 | SubFolders 属性
应用于: FileSystemObject 对象 织梦内容管理系统

上一篇:DriveType 属性 下一篇:DriveLetter 属性
文章评论
共有位Admini5网友发表了评论 查看完整内容