要实现如下图所示的表单:
实现代码为:
<form action="${pageContext.request.contextPath}/servlet/AddCustServlet" method="post" >
<table align="center" border="1px">
<tr>
<th>客户姓名</th>
<th><input type="text" name="name"/></th>
</tr>
<tr>
<th>客户性别</th>
<th>
<input type="radio" name="gender" value="男"/>男
<input type="radio" name="gender" value="女"/>女
</th>
</tr>
<tr>
<th>出身日期</th>
<th><input type="text" name="birthday"/></th>
</tr>
<tr>
<th>手机号码</th>
<th><input type="text" name="cellphone"/></th>
</tr>
<tr>
<th>电子邮箱</th>
<th><input type="text" name="email"/></th>
</tr>
<tr>
<th>客户爱好</th>
<th>
<input type="checkbox" name="preference" value="篮球"/>篮球
<input type="checkbox" name="preference" value="排球"/>排球
<input type="checkbox" name="preference" value="铅球"/>铅球
<input type="checkbox" name="preference" value="足球"/>足球
<input type="checkbox" name="preference" value="羽毛球"/>羽毛球
</th>
</tr>
<span style="white-space:pre"> </span><tr>
<th>客户类型</th>
<th>
<select name="type">
<option value="钻石客户">钻石客户</option>>
<option value="白金客户">白金客户</option>>
<option value="黄金客户">黄金客户</option>>
<option value="白银客户">白银客户</option>>
<option value="青铜客户">青铜客户</option>>
<option value="黑铁客户">黑铁客户</option>>
</select>
</th>
</tr>
<tr>
<th>客户描述</th>
<th>
<textarea rows="5" cols="45" name="description"></textarea>
</th>
</tr>
<tr>
<th>客户姓名</th>
<th>
<input type="submit" value="添加客户"/>
</th>
</tr>
</table>
</form>