批处理之家's Archiver

michael8111 发表于 2010-7-15 11:40

批处理网址导航

这是一个简单的批处理网址导航,类似hao123。
代码如下:
[code]
@echo off
goto cd
:cuo
cls
echo\&echo                  你选择的“%xz%”为无效选择!!!
pause>nul&goto cd
cls
:1_
start "" "http://www.baidu.com/" &goto cd
:2_
start "" "http://www.google.cn/" &goto cd
:3_
start "" "http://cn.yahoo.com/" &goto cd
:4_
start "" "http://www.qidian.com/" &goto cd
:5_
start "" "http://www.readnovel.com/" &goto cd
:6_
start "" "http://www.xxsy.net/" &goto cd
:7_
start "" "http://www.17173.com/" &goto cd
:8_
start "" "http://www.4399.net/" &goto cd
:9_
start "" "http://www.game.com.cn/" &goto cd
:10_
start "" "http://military.china.com/zh_cn/" &goto cd
:11_
start "" "http://mil.news.sina.com.cn/" &goto cd
:12_
start "" "http://news.ifeng.com/mil/" &goto cd
:13_
start "" "http://www.youku.com/" &goto cd
:14_
start "" "http://www.tudou.com/" &goto cd
:15_
start "" "http://www.ku6.com/" &goto cd
:16_
start "" "http://www.chinanews.com.cn/" &goto cd
:17_
start "" "http://www.gov.cn/" &goto cd
:18_
start "" "http://www.people.com.cn/" &goto cd
:19_
start "" "http://www.eastmoney.com/" &goto cd
:20_
start "" "http://www.hexun.com/" &goto cd
:21_
start "" "http://fund.eastmoney.com/" &goto cd
:23_
start "" "http://hi.baidu.com/" &goto cd
:24_
start "" "http://qzone.qq.com/" &goto cd
:25_
start "" "http://www.chinahr.com/" &goto cd
:26_
start "" "http://www.iciba.com/" &goto cd
:27_
start "" "http://ditu.google.cn/" &goto cd
:28_
start "" "http://www.railcn.net/" &goto cd
:29_
start "" "http://www.chinabug.net/" &goto cd
:30_
start "" "http://www.zhcw.com/" &goto cd
:31_
start "" "http://www.lottery.gov.cn/" &goto cd
:32_
start "" "http://www.315ts.net/" &goto cd
:33_
start "" "http://www.cctv.com/l" &goto cd
:34_
start "" "http://www.360.cn/" &goto cd
:35_
start "" "http://blog.sina.com.cn/" &goto cd
:22_
start "" "http://www.deskcity.com/" &goto cd
:36_
start "" "http://www.163ufo.com/" &goto cd
:37_
start "" "http://www.cma.gov.cn/" &goto cd
:38_
start "" "http://www.hunantv.com/" &goto cd
:39_
start "" "http://www.sina.com.cn/" &goto cd
:40_
start "" "http://www.qq.com/" &goto cd
:41_
start "" "http://www.sohu.com/" &goto cd
:42_
start "" "http://www.hao123.com/" &goto cd
:43_
start "" "http://mp3.baidu.com/" &goto cd
:44_
start "" "http://mp3.sogou.com/" &goto cd
:45_
start "" "http://mp3.gougou.com/" &goto cd
:cd
@echo off
title 网址大全
color e
mode con cols=90 lines=30
set "xz=:"
cls
echo\&echo *======================================================================================*
echo.                                     主菜单
echo\&echo *======================================================================================*
echo. 搜索引擎       1.百度                     2.google                   3.yahoo
echo. 小说           4.起点                     5.小说阅读网               6.潇湘书院
echo. 游戏           7.17173                    8.4399                     9.游戏中国
echo. 军事          10.中华网-军事             11.新浪军事                12.凤凰网-军事
echo. 视频          13.优酷                    14.土豆                    15.酷6
echo. 新闻及政府网站16.中国新闻网              17.中国政府网              18.人民网
echo.               39.新浪                    40.QQ网                    41.搜狐
echo. 财经          19.东方财富                20.和讯                    21.天天基金网
echo. 博客          22.百度空间                24.QQ空间                  35.新浪博客
echo. 其他          25.中华英才网              26.i词霸                   27.谷歌地图
echo.               28.中国铁道网              29.穿帮网                  30.福利彩票
echo.               31.体育彩票                32.315投诉                 33.CCTV
echo.               34.360安全卫士             22.桌面城市                36.未解之谜网
echo.               37.中国气象局              38.金鹰网                  
echo. 音乐          43.百度MP3                 44.搜狗音乐                45.狗狗音乐               
echo.                           如果你觉得本网址大全不够全面,请按:“42”
echo. ————————————————————————————         0 退出
for /f "tokens=15" %%i in ('ipconfig ^| find /i "ip address"') do set ip=%%i
echo                                   当前IP为%ip%
echo\&set /p xz=请输入0-46之内的数,然后按回车,即打开网页:
if "%xz%" == "0" exit
if "%xz%" == "1" goto 1_
if "%xz%" == "2" goto 2_
if "%xz%" == "3" goto 3_
if "%xz%" == "4" goto 4_
if "%xz%" == "5" goto 5_
if "%xz%" == "6" goto 6_
if "%xz%" == "7" goto 7_
if "%xz%" == "8" goto 8_
if "%xz%" == "9" goto 9_
if "%xz%" == "10" goto 10_
if "%xz%" == "11" goto 11_
if "%xz%" == "12" goto 12_
if "%xz%" == "13" goto 13_
if "%xz%" == "14" goto 14_
if "%xz%" == "15" goto 15_
if "%xz%" == "16" goto 16_
if "%xz%" == "17" goto 17_
if "%xz%" == "18" goto 18_
if "%xz%" == "19" goto 19_
if "%xz%" == "20" goto 20_
if "%xz%" == "21" goto 21_
if "%xz%" == "22" goto 22_
if "%xz%" == "23" goto 23_
if "%xz%" == "24" goto 24_
if "%xz%" == "25" goto 25_
if "%xz%" == "26" goto 26_
if "%xz%" == "27" goto 27_
if "%xz%" == "28" goto 28_
if "%xz%" == "29" goto 29_
if "%xz%" == "30" goto 30_
if "%xz%" == "31" goto 31_
if "%xz%" == "32" goto 32_
if "%xz%" == "33" goto 33_
if "%xz%" == "34" goto 34_
if "%xz%" == "35" goto 35_
if "%xz%" == "36" goto 36_
if "%xz%" == "37" goto 37_
if "%xz%" == "38" goto 38_
if "%xz%" == "39" goto 39_
if "%xz%" == "40" goto 40_
if "%xz%" == "41" goto 41_
if "%xz%" == "42" goto 42_
if "%xz%" == "43" goto 43_
if "%xz%" == "44" goto 44_
if "%xz%" == "45" goto 45_
goto cuo[/code]

qaz123654 发表于 2010-7-15 14:09

~~楼主你辛苦了
把最后的if简化下
[code]
if "%xz%" == "0" exit
echo %xz%|findstr "[^0-9]" &&goto cuo
if %xz% lss 46 goto %xz%_
goto cuo
[/code]

[[i] 本帖最后由 qaz123654 于 2010-7-15 14:59 编辑 [/i]]

狱渊 发表于 2013-4-29 17:09

很不错  谢谢了

work345 发表于 2013-10-22 11:48

不错 收藏了啊

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.