首先,我们在做留言薄之前,先做出一个输入屏的界面效果,也就是生成留言部输入屏幕的htmL页,然后在这些htmL源代码中加入ASP脚本,我这里得到的htmL代码如下。
*文件名:book.htm
以下为引用的内容:
<html>
<head>
<title>留言薄</title>
</head>
<body bgcolor="#BED9FC" background="images/bg.gif">
<p align="center"><img src="images/gbook.gif" alt="GBook.gif (12142 bytes)" WIDTH="374"
HEIGHT="83"> </p>
<p align="center">[<a href="disp.asp">我要看留言板</a>] [<a href="../index.html">返回首页</a>]</p>
<form method="POST" action="book.asp">
<input type="hidden" name="task" value="insert"><div align="left"><table>
<tr>
<td align="right">姓名</td>
<td><img src="images/bottom-b.gif" alt="BUTTOM-B.GIF (179 bytes)" WIDTH="16" HEIGHT="16"></td>
<td><input name="name" size="46"></td>
</tr>
<tr>
<td align="right">性别</td>
<td><img src="images/bottom-g.gif" alt="BUTTOM-G.GIF (179 bytes)" WIDTH="16" HEIGHT="16"></td>
<td><input name="sex" size="46"></td>
</tr>
<tr>
<td align="right">来自</td>
<td><img src="images/bottom-b.gif" alt="BUTTOM-B.GIF (179 bytes)" WIDTH="16" HEIGHT="16"></td>
<td><input name="from" size="46"></td>
</tr>
<tr>
<td align="right">主页URL</td>
<td><img src="images/homepage.gif" alt="HomePage.gif (1232 bytes)" WIDTH="30" HEIGHT="30"></td>
<td><input name="url" size="46"></td>
</tr>
<tr>
<td align="right">
E-mail</td>
<td><img src="images/email.gif" alt="Email.gif (1197 bytes)" WIDTH="30" HEIGHT="30"></td>
<td><input name="email" size="46"></td>
</tr>
<tr>
<td align="right">留言</td>
<td colspan="2"><textarea wrap="off" name="comments" cols="49" rows="9"></textarea></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><dl>
<dd align="center"> <input type="submit" value="我写好了">
<input type="reset" value="重新再写"></dd>
</dl>
</td>
</tr>
</table>
</div>
</form>
<p align="center"> </p>
</body>
</html>