联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@ECHO off :start cls ECHO. ECHO Y. Print Hello ECHO N. Print Bye ECHO C. Print Test set choice= set /p choice=Type the character to print text.Y[Yes]\N[No]\C[Cancel] if not "%choice%"=="" set choice=%choice:~0,1% if /i "%choice%"=="Y" goto hello if /i "%choice%"=="N" goto bye if /i "%choice%"=="C" goto test ECHO "%choice%" is not valid please try again ECHO. goto start :hello ECHO HELLO&pause>nul goto end :bye ECHO BYE&pause>nul goto end :test ECHO TEST&pause>nul goto end :end