批处理高手请进 变量问题

来源:百度知道 编辑:UC知道 时间:2024/05/14 05:07:22
把批处理 里面的百度转出来 运行
@echo off
set a=4
set /a a=%Random% %% %a%
if "%a%"=="0" start %www.baidu.com%
if "%a%"=="1" start www.zol.com.cn
if "%a%"=="2" start www.cctv.com
if "%a%"=="3" start www.kugoo.com
start %www.baidu.com%
怎么样可以通过变量

@echo off
set a=4
set /a a=%Random% %% %a%
if "%a%"=="0" start www.baidu.com
if "%a%"=="1" start www.zol.com.cn
if "%a%"=="2" start www.cctv.com
if "%a%"=="3" start www.kugoo.com
exit

这样吧。