<html>
<head>
<title> driver对象应用 </title>
</head>
<body bgcolor= "#FFFFFF ">
<%
on error resume next
dim oFso,cDrvs,oDrv,oDic,oKey
set oDic = Server.CreateObject( "SCRIPTING.DICTIONARY ")
oDic.Add "DriveLetter ", "盘符 "
oDic.Add "DriveType ", "驱动器类型 "
oDic.Add "FileSystem ", "文件类型 "
oDic.Add "SerialNumber ", "序列号 "
oDic.Add "VolumeName ", "驱动器卷名 "
oDic.Add "TotalSize ", "总计空间 "
oDic.Add "AvailableSpace ", "可用空间 "
oDic.Add "FreeSpace ", "剩余空间 "
set oFso = Server.CreateObject( "SCRIPTING.FILESYSTEMOBJECT ")
set cDrvs = oFso.Drives
response.write " <table> " & vbCrLf
for each oDrv in cDrvs
for each oKey in oDic
response.write " <tr> <td> "& oDic.Item(oKey) & ": </td> <td> "& Eval( "oDrv. " & oKey) & " </td> </tr> " & vbCrLf
next
Response.Write " <tr> <td colspan= " "2 " "> <hr> </td> </tr> " & vbCrLf
next
response.write " </table> "
%>
</body>
</html>
就是这个代码不懂:&Eval( "oDrv. "&oKey)
是什么意思的呢~
&eval未接触过的~`
odrv.带个点,更加模糊了,odrv我理解为键变量,不知对无呢?再有为什么要加双引号呢,表示键变量为字符串吗?
顺便能举个与&eval相关的实例的吗?``