VBScript中;数字菜单定义循环? [英] vbscript; numeric menu define loop?
本文介绍了VBScript中;数字菜单定义循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好世界,今天我的问题是我怎么能有一个循环,它将循环取决于数字下拉菜单中的定义。举个例子;如果下拉菜单是3,我希望动作循环3次。如果菜单为7,则操作将循环7次。有人可以帮我吗?
解决方案
查看 CINT [ ^ ]。然后在你的循环定义中使用它,即
i as integer = 0 to CINT (myDropDown.SelectedValue)
....你的代码在这里....
下一页 i
我的VB生锈了所以这可能不会编译但你应该能够得到点。
hello world, my question today is how can i have a loop that will loop depending what is defied in the numeric drop down menu. for a example; if the drop down menu is 3, i would like the action to loop 3 times. if the menu is 7, the action will loop 7 times. can some one help me please?
解决方案
look at CINT[^]. Then use that in your loop definition i.e.
for i as integer = 0 to CINT(myDropDown.SelectedValue) .... your code here .... next i
my VB is rusty so this probably wont compile but you should be able to get the point.
这篇关于VBScript中;数字菜单定义循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文