利用ASP表单请求方法实现的动态Web火车票

完整示例代码及其附加文件资源下载:hcp

演示图例为:

  

index.html文件代码为:

<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<title></title>
</head>
<body>
<form action=”process.asp” method=”post”>
出发地:<input type=”text” name=”departure”><br>
目的地:<input type=”text” name=”destination”><br>
车次:<input type=”text” name=”trainNumber”><br>
售票人:<input type=”text” name=”seller”><br>
<input type=”submit” value=”OK”>
</form>
</body>
</html>

process.asp文件代码为:

<%
Session.CodePage=65001
Response.Charset=”UTF-8″
%>

<html>
<head lang=”en”>
<meta charset=”UTF-8″>
<title>火车票</title>
</head>
<body>
<table align=”center” background=”imgs\bg.jpg” cellpadding=”0″ width=”800″ height=”600″ >
<tr height=”60″>
<td colspan=”2″ style=”color:#ff0000;font-size:40px;”>&nbsp;E&nbsp;0&nbsp;0&nbsp;0&nbsp;0&nbsp;0&nbsp;1</td>
<td colspan=”2″ align=”right”><h1><%=request.form(“seller”)%></h1></td>
<td width=”20″><img src=”imgs\shouzi.jpg”></td>
<td width=”25″>&nbsp;</td>
</tr>
<tr height=”70″>
<td width=”250″ align=”center” style=”font-size: 50px;”><%=request.form(“departure”)%></td>
<td width=”200″ align=”center” style=”font-size: 50px;”><%=request.form(“trainNumber”)%>次</td>
<td colspan=”3″ align=”center” style=”font-size: 50px;”><%=request.form(“destination”)%></td>
<td>&nbsp;</td>
</tr>
<tr height=”60″>
<td width=”250″ align=”center” style=”font-size: 40px;”>DongTuDaTang</td>
<td width=”200″ align=”center” style=”font-size: 40px;”>&longrightarrow;</td>
<td colspan=”2″ align=”right” style=”font-size: 40px;”>XiTian</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=”2″ style=”font-size: 35px;”>公元前578年甲子日未时发车</td>
<td colspan=”2″ align=”right” style=”font-size: 35px;”>01车001号</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr height=”60″>
<td colspan=”2″ style=”font-size: 35px;”>全&nbsp;&nbsp;价&nbsp;&nbsp;1000两</td>
<td colspan=”2″ align=”center” style=”font-size: 35px;”>硬座</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr height=”50″>
<td colspan=”2″ style=”font-size: 30px;”>限乘当日当次车</td>
<td width=”50″>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=”2″ style=”font-size: 30px;”>唐&nbsp;&nbsp;&nbsp;&nbsp;僧</td>
<td>&nbsp;</td>
<td colspan=”2″ rowspan=”4″ align=”right”><img src=”imgs\2Dcode.png”></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=”2″ style=”font-size: 35px;”>1234567890****abcd</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr >
<td colspan=”2″ style=”font-size: 25px;”>03065115515561&nbsp;&nbsp;E000001</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=”2″>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

 

 

发表评论

邮箱地址不会被公开。 必填项已用*标注