@echo off
:beginAction
echo ***********************
echo * 1: Action1 execute. *
echo * 2: Action2 execute. *
echo * 3: Action3 execute. *
echo * 4: exit. *
echo ***********************
set /p selectParam=Chose plase:
if "%selectParam%" equ "1" call:1
if "%selectParam%" equ "2" call:2
if "%selectParam%" equ "3" call:3
if "%selectParam%" equ "4" call:endAction
:1
set /p param=input param1:
echo "Action1 execute success!!!"
call:beginAction
:2
set /p param=input param2:
echo "Action2 execute success!!!"
call:beginAction
:3
set /p param=input param3:
echo "Action3 execute success!!!"
call:beginAction
:endAction
exit
========================================================================================
注意:
"%selectParam%" ,这里要带上引号,目的是当作字符串来比较