晨露听诗 当前离线
列兵
@echo off set /a var=10 :loop echo %var% if %var%==1 goto abc set /a var-=1 for /l %%i in (1,1,5040) do echo %%i>nul ::这里循环的作用就是延时,大约1s goto loop :abc复制代码
TOP
jian123ch 当前离线
上等兵
@echo off for /l %%i in (10,-1,0) do ( @ping -n %1 127.0.1>nul set /p= %%i <nul ) pause >nul复制代码
bailong360 (zhonghua)当前离线
上尉
@echo off for /l %%i in (10 -1 1) do ( echo %%i ping -n 2 localhost>nul ) pause>nul复制代码
BHsolve 当前离线
@echo off set /a c=1 :while set /a n=11-c set /a d=1 if %n% geq %d% ( echo %n% && set /a c+=1) && goto while else call :end :end pause复制代码
battab 当前离线
一级士官
@echo off for /l %%i in (10,-1,1) do ( echo %%i ping -n 2 127.1>nul cls ) pause>nul复制代码
lifei259 当前离线
二级士官
@echo off echo.十秒倒计时&echo. for /l %%i in (10,-1,0) DO ( echo.%%i ping 127.1 -n 3 1>nul&echo. ) PAUSE复制代码
怪怪的僵尸 当前离线
@echo off for /l %%i in (10,-1,1) do ( cls echo %%i ping 127.1 -n 1 >nul)复制代码
@echo off set a=11 :loop set /a a-=1 if %a% gtr 0 ( echo %a% ping 127.1 -n 1 >nul cls go to :loop) pause复制代码
triadhzl 当前离线
@echo off color 3b for /L %%a in ( 10,-1,0 ) do ( for /l %%a in (1,1,8) do echo\ echo 倒计时 %%a 秒 ping -n 2 127.1 1>nul 2>nul cls )复制代码
Jay罗小尼 当前离线
@echo off for %%I in (0 1 2 3 4 5 6 7 8 9) do @ping 127.0.0.1 -n 3 > nul & echo %%I pause复制代码
狱渊 当前离线
中尉
@echo off for /l %%a in (10,-1,0) do echo %%a&ping /n 2 127.1>nul&cls pause复制代码
楚牛香 当前离线
@echo off set a=10 for /l %%i in (10,-1,1) do (echo %%i) pause>nul复制代码
2846090741 当前离线
@for /l %%i in (10,-1,1) do @echo %%i @pause>nul复制代码
skynjupt 当前离线
@if not defined DEBUG (@echo off) title 倒计时练习批处理&chcp 936>nul&color 0A :Menu set "choice=" echo.&echo. echo. 倒计时练习批处理 echo. 1.利用for /L 计时 echo. 2.利用if和goto计时 echo. 3.利用call和shift计时 echo. 4.退出 echo. set /p "choice= 请选择:" if "%choice%" equ "1" color 1A&goto 01_For if "%choice%" equ "2" color 2A&goto 02_if if "%choice%" equ "3" color 3A&goto 03_shift if "%choice%" equ "4" goto Exit echo 非法输入! ping -w 2 -n 2 127.0.0.1>nul 2>&1 cls goto Menu :: 1.利用for /L 计时 :01_For echo.1.利用for /L 计时 for /l %%i in (10,-1,1) do ( set /p=%%i <nul ping -w 2 -n 2 127.0.0.1>nul 2>&1 set /p=<nul ) goto End :: 2.利用if和goto计时 :02_if echo.2.利用if和goto计时 set "num=11" :Loop set /a num-=1 set /p=<nul&set /p=%num% <nul ping -w 2 -n 2 127.0.0.1>nul 2>&1 if "%num%" neq "1" (goto Loop) goto End :: 3.利用call和shift计时 :03_shift echo.3.利用call和shift计时 set "num=10 9 8 7 6 5 4 3 2 1" call :Timer %num% goto End :Timer set /p=<nul&set /p=%1 <nul ping -w 2 -n 2 127.0.0.1>nul 2>&1 shift /1 if "%1" neq "" goto Timer goto :eof :End echo.&echo 倒计时结束,按任意键继续... pause>nul&cls&goto Menu :Exit exit复制代码
Clarkky 当前离线
@echo off title 快跑! for /l %%i in (10,-1,1) do ( cls echo 倒计时%%is ping -n 2 127.1>nul ) cls title 时间到 echo 时间到,你死了。。。 pause>nul复制代码