中华考试网·阅读新闻
编程开发 > ASP > 文章内容

ASP编程教程技巧综合大全(41)

2015-8-25编辑:ljnbset
下面的代码说明在 JScript 中实现同样的功能:
function ShowDriveInfo1(drvPath)
{
var fso, drv, s ="";
fso = new ActiveXObject("Scripting.FileSystemObject");
drv = fso.GetDrive(fso.GetDriveName(drvPath));
s += "Drive " + drvPath.toUpperCase()+ " - ";
s += drv.VolumeName + "
";
s += "Total Space: " + drv.TotalSize / 1024;
s += " Kb" + "
";
s += "Free Space: " + drv.FreeSpace / 1024;
s += " Kb" + "
";
Response.Write(s);
}
ASP编程教程技巧综合大全(40)
咨询热线:4000-525-585(免长途费)