| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 429 人关注过本帖
标题:[求助]driver对象问题
取消只看楼主 加入收藏
sssoyy525
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-11-11
收藏
 问题点数:0 回复次数:0 
[求助]driver对象问题

<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相关的实例的吗?``

搜索更多相关主题的帖子: 对象 driver 
2007-11-11 10:16
快速回复:[求助]driver对象问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016135 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved