Posted on 2011-12-16 17:29
xcp 阅读(1315)
评论(0) 编辑 收藏 所属分类:
Ajax
<html>
<head>
</head>
<body>
<script type="text/javascript">
var fso;
var drvs;
var drv;
var s;
fso = new ActiveXObject("Scripting.FileSystemObject");
drvs = new Enumerator(fso.Drives);
s = " ";
for(;!drvs.atEnd();drvs.moveNext()){
drv = drvs.item();
s = s + drv.DriveLetter;
s += " - ";
if (drv.DriveType == 3)
n = drv.ShareName;
else if (drv.IsReady)
n = drv.VolumeName + " totalSize: " + drv.totalSize + " freeSpace: " + drv.freeSpace + " availableSpace: " + drv.availableSpace;
else
n = "[Drive not ready] ";
s += n + "\n ";
}
alert(s);
</script>
</body>
</html>
名称: ♪4C.ESL | .↗Evon
口号: 遇到新问题♪先要寻找一个方案乄而不是创造一个方案こ
mail: 联系我