完整示例代码及其附加文件资源下载: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;”> E 0 0 0 0 0 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″> </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> </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;”>⟶</td>
<td colspan=”2″ align=”right” style=”font-size: 40px;”>XiTian</td>
<td> </td>
<td> </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> </td>
<td> </td>
</tr>
<tr height=”60″>
<td colspan=”2″ style=”font-size: 35px;”>全 价 1000两</td>
<td colspan=”2″ align=”center” style=”font-size: 35px;”>硬座</td>
<td> </td>
<td> </td>
</tr>
<tr height=”50″>
<td colspan=”2″ style=”font-size: 30px;”>限乘当日当次车</td>
<td width=”50″> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan=”2″ style=”font-size: 30px;”>唐 僧</td>
<td> </td>
<td colspan=”2″ rowspan=”4″ align=”right”><img src=”imgs\2Dcode.png”></td>
<td> </td>
</tr>
<tr>
<td colspan=”2″ style=”font-size: 35px;”>1234567890****abcd</td>
<td> </td>
<td> </td>
</tr>
<tr >
<td colspan=”2″ style=”font-size: 25px;”>03065115515561 E000001</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan=”2″> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>