批处理做网页HTML
批处理做网页HTML
准备工作:图片,音乐
图片格式:bmp、jpg、gif 音乐格式:MP3
好了,现在开始,批处理帮你完成~
第一步:打开bat程序,输入网页标题,显示在网页上的。
第二步:你想要网页中的背景是1图片、2颜色(就是你准备好的图片) 颜色代码:自己试,嘻嘻~比如:123456 625984 369256 426359
第三步:背景音乐:MP3格式
第四步:字体的颜色:就是内容字体的颜色
第五步:文章标题:内容的标题,接下设置标题大小
第六步:请输入您的内容
第七步:大工告成~完成拉~!
缺点:只能在本机才能看到图片和音乐,不过用颜色代码,不用音乐和图片就没关系。呵呵~(因为记事本不能插入图片有音乐) ============================================================================== 批处理做网页HTML代码
echo off title 批处理做网页HTML cls color 4e echo ^<html^>^ >index.htm echo ^<head^>^ >>index.htm echo. set /p a=请输入网页标题: echo. echo ^<title^>^%a%^<^/title^>^ >>index.htm echo ^</head^>^ >>index.htm echo.
set /p f=你想要网页中的背景是(1图片、2颜色): echo. if /i "%f%"=="1" goto 1 if /i "%f%"=="2" goto 2 :1 echo. set /p b=请编辑你想要的背景图片路径(例如: c:\1.bmp、jpg、gif...): echo. echo ^<body background=%b%^>^ >>index.htm goto next :2 echo. set /p d=请编辑你想要的背景颜色(请直接输入6位颜色码): echo. echo ^<body bgcolor=%d%^>^ >>index.htm goto next :next echo. set /p c=请编辑你想要的背景音乐路径(例如: c:\1.mp3): echo. echo ^<embed src=%c% autostart="true" loop="true" hidden="true"^>^ >>index.htm echo. set /p e=请选择你想要的发光字体的颜色(1紫色、2黄色): echo. set /p g=请编辑文章标题: echo. set /p h=请设置标题大小(直接输入数字): echo. if /i "%e%"=="1" goto a if /i "%e%"=="2" goto b :a echo ^<center^>^ >>index.htm echo ^<font style="filter: glow(color=#FF9966,strength=3); height:10px; color:white; padding:1px" size=%h%^>^%g%^<^/font^>^ >>index.htm echo ^</center^>^ >>index.htm goto go :b echo ^<center^>^ >>index.htm echo ^<font style="filter: glow(color=#9966FF,strength=3); height:10px; color:white; padding:1px" size=%h%^>^%g%^<^/font^>^ >>index.htm echo ^</center^>^ >>index.htm echo ^<br^>^ >>index.htm echo ^<br^>^ >>index.htm echo ^<br^>^ >>index.htm echo ^<br^>^ >>index.htm goto go :go echo. set /p i=请输入您的内容: echo. echo ^<center^>^ >>index.htm echo ^<font style="filter: glow(color=#9966FF,strength=3); height:10px; color:white; padding:1px"^>^%i%^<^/font^>^ >>index.htm echo ^</center^>^ >>index.htm echo ^</body^>^ >>index.htm echo ^</html^>^ >>index.htm echo. echo 恭喜你!完成拉!~ echo. pause >nul
|