小编Bri*_*ant的帖子

如果变量等于数字goto

如果一个变量等于,例如1然后gotostart1,但如果同一变量等于2然后gotostart2.

这是我到目前为止:

if %method% == "1" (goto start1)
if %method% == "2" (goto start2)

:start1
echo start1
pause
exit

:start2
echo start2
pause
exit
Run Code Online (Sandbox Code Playgroud)

但即使method变量是等于2它总是呼应我start1...

batch-file

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

batch-file ×1