惆怅而又凄凉 当前离线
上等兵
bailong360 (zhonghua)当前离线
上尉
@echo off echo 1. 输出 foo echo 2. 输出 bar echo 3. 输出 foobar set /p choice=请输入选项(以空格分隔): for %%i in (%choice) do call :choice_%%i pause&exit :choice_1 echo foo goto :eof :choice_2 echo bar goto :eof :choice_3 echo foobar goto :eof复制代码
TOP
@echo off :home echo 1. 输出 foo echo 2. 输出 bar echo 3. 输出 foobar set /p choice=请输入选项(以空格分隔): for %%i in (%choice%) do call :choice_%%i pause&goto :home :choice_1 echo foo goto :eof :choice_2 echo bar goto :eof :choice_3 echo foobar goto :eof复制代码