中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [已解决]寻求获取file(i).value数值的 VBS 脚本
作者:
标题: [已解决]寻求获取file(i).value数值的 VBS 脚本 上一主题 | 下一主题
zh159
金牌会员




积分 3687
发帖 1467
注册 2005-8-8
状态 离线
『楼 主』:  [已解决]寻求获取file(i).value数值的 VBS 脚本

复选框:

  Quote:
<input type="checkbox" id="file1" name="file1" value="FileName1">
<input type="checkbox" id="file2" name="file2" value="FileName2">
<input type="checkbox" id="file3" name="file3" value="FileName3">
<input type="checkbox" id="file4" name="file4" value="FileName4">

要获取选中的复选框数值可用:

  Quote:
if file1.checked then MsgBox file1.value
if file2.checked then MsgBox file2.value
if file3.checked then MsgBox file3.value
if file4.checked then MsgBox file4.value

获取

但是如果数量大,if脚本就要跟着一样的数量(复选框是根据文件多少自动调整的)
试过

  Quote:
for i = 1 to Num
if file(i).checked then MsgBox file(i).value)
next

方式无效,在网上没找到何时的方法解决,询问有没有VBS方面的高手能解决?

[ Last edited by zh159 on 2007-3-24 at 04:32 PM ]

2007-3-25 02:12
查看资料  发短消息 网志   编辑帖子  回复  引用回复
electronixtar
铂金会员





积分 7493
发帖 2672
注册 2005-9-2
状态 离线
『第 2 楼』:  

提示:eval()

例如:

i=1
msgbox eval("file"  & i & ".checked")

[ Last edited by electronixtar on 2007-3-25 at 05:08 AM ]

   此帖被 +15 点积分         点击查看详情   
评分人:【 zh159 分数: +15  时间:2007-3-25 05:30





C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
2007-3-25 04:49
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
zh159
金牌会员




积分 3687
发帖 1467
注册 2005-8-8
状态 离线
『第 3 楼』:  



  Quote:
Originally posted by electronixtar at 2007-3-24 15:49:
提示:eval()

例如:

i=1
msgbox eval("file"  & i & ".checked")


搞定,多谢了

2007-3-25 05:31
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: