【html学习之】表单customer示例
2014-11-07 18:56
302 查看
要实现如下图所示的表单:
实现代码为:
<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>
实现代码为:
<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>
相关文章推荐
- HTML学习笔记【9】使用表单
- HTML学习感想(2)【使网页具有交互功能的工具—表单】
- 学习历程之HTML篇五(表单)
- ASP.NET MVC3学习心得-----表单和HTML辅助方法
- 黑马程序员_学习笔记4——html标签和表单标签
- web学习—html标签—表单及其控件(一)
- web学习—html标签—表单及其控件(三)
- web学习—html标签—表单及其控件(二)
- 学习html三~~表单和框架
- HTML学习笔记【9】使用表单
- html系统学习之三 <表格,列表,表单>
- JavaScript与 HTML表单的交互过程,想要学习动态网页但是无从下手的新手看看。
- ASP.NET MVC3学习心得-----表单和HTML辅助方法
- HTML学习之表单备忘
- HTML学习笔记三表单和框架
- HTML学习之表单传送服务器(简略)
- html 5--(表单学习)-03
- HTML-form表单的学习
- HTML学习(5)列表、块、表单
- HTML学习笔记:表单标记