![Board logo](images/default/logo.gif)
标题: [其他] 批处理choice命令可以选择十个数吗? [打印本页]
作者: dantesky 时间: 2019-12-15 21:00 标题: 批处理choice命令可以选择十个数吗?
- choice /c:1234567890 /n /m "请按键1、2、3、4、5、6、7、8、9、0 选择功能"
- if %errorlevel%==1 goto test1
- if %errorlevel%==2 goto test2
- if %errorlevel%==3 goto test3
- if %errorlevel%==4 goto test4
- if %errorlevel%==5 goto test5
- if %errorlevel%==6 goto test6
- if %errorlevel%==7 goto test7
- if %errorlevel%==8 goto test8
- if %errorlevel%==9 goto test9
- if %errorlevel%==0 goto et
- 中间省略了
- :et
- exit
复制代码
这个选择1-9都正常,但是选择0的时候并没有退出
作者: terse 时间: 2019-12-15 23:07
用A choice /c:123456789A/n /m 。。。。
下面判断是10
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |