- ·上一篇文章:特大数值的加法运算演示代码
- ·下一篇文章:获取时分秒x+判断时间段
- ·百度中搜索更多的关于“BAT生成网页程序”相关内容
- ·谷歌中搜索更多的关于“BAT生成网页程序”相关内容
- ******申明******
- 本站文章内容有部分为收录网络中其他网友内容,DOS资源站不保证所有的代码都适合你使用。
- 由于编辑匆忙,有可能造成某些脚本文件出现丢失代码或代码无法运行的情况,请网友根据情况自行修改。
- 如果能将出错部分反馈给我,那就更好了。
BAT生成网页程序
代码很简单,容易懂,这里是把网页的HTML语言与批处理的结合,不会做网页的,也可以拿这个批处理给自己喜欢的人来个浪漫的表达方式!代码如下:
echo off&title DOS资源站 www.cmdos.net
title 魔法情书
cls
color fa
echo ^<html^>^ >index.htm
echo ^<head^>^ >>index.htm
set /p a=请输入网页标题:
echo ^<title^>^%a%^<^/title^>^ >>index.htm
echo ^</head^>^ >>index.htm
set /p f=你想要网页中的背景是(1图片、2颜色):
if /i "%f%"=="1" goto 1
if /i "%f%"=="2" goto 2
:1
set /p b=请编辑你想要的背景图片路径(例如: c:\1.bmp、jpg、gif...如果在同一文件夹内,则可以直接输入文件名):
echo ^<body background=%b%^>^ >>index.htm
goto next
:2
set /p d=请编辑你想要的背景颜色(请直接输入6位颜色码):
echo ^<body bgcolor=%d%^>^ >>index.htm
goto next
:next
set /p c=请编辑你想要的背景音乐路径(例如: c:\1.mp3):
echo ^<embed src=%c% autostart="true" loop="true" hidden="true"^>^ >>index.htm
set /p e=请选择你想要的发光字体的颜色(1紫色、2黄色):
set /p g=请编辑文章标题:
set /p h=请设置标题大小(直接输入数字):
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
set /p i=请输入你的甜言蜜语吧:
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 恭喜你!完成拉!~发给你爱的人吧!祝福你们~
pause >nul

