level 1
tsgxjr
楼主
要实现,弹出输入框输入1-12以内的数字,如果输入的是1-12以内的数字,则跳出循环执行后面的语句,如果输入的是1-12以外的数字跳出“非法数字”提示,按确定重新跳出输入框,
倘若输入的为非数字,则跳出“非法字符”提示,按确定重新跳出输入框。
现在的问题是,输入数字都没问题,但是输入英文,会跳出“非法字符”的提示,按确定后,却自动跳出循环了。。。这是为啥。
DO
mon=Inputbox(msg,"批发报表月份")
if mon="" then
WScript.Quit
else
if isnumeric(mon)=true then
int(mon)
if mon>0 and mon<13 then
msgbox("按<确定>导出"+mon+"月份批发报表")
else
Msgbox("非法数字")
end if
else
msgbox("非法字符")
end if
end if
Loop until isnumeric(mon)=true and mon>0 and mon<13
msgbox("跳出循环")
2015年06月05日 04点06分
1
倘若输入的为非数字,则跳出“非法字符”提示,按确定重新跳出输入框。
现在的问题是,输入数字都没问题,但是输入英文,会跳出“非法字符”的提示,按确定后,却自动跳出循环了。。。这是为啥。
DO
mon=Inputbox(msg,"批发报表月份")
if mon="" then
WScript.Quit
else
if isnumeric(mon)=true then
int(mon)
if mon>0 and mon<13 then
msgbox("按<确定>导出"+mon+"月份批发报表")
else
Msgbox("非法数字")
end if
else
msgbox("非法字符")
end if
end if
Loop until isnumeric(mon)=true and mon>0 and mon<13
msgbox("跳出循环")