complex form
来源:互联网 发布:加工中心攻丝编程格式 编辑:程序博客网 时间:2024/05/20 18:42
doPost
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); String username = request.getParameter("username"); String password = request.getParameter("password"); String gender = request.getParameter("gender"); String city = request.getParameter("city"); String[] parameterValues = request.getParameterValues("hobbies"); System.out.println(username); System.out.println(password); System.out.println(gender); System.out.println(city); for (String string : parameterValues) { System.out.println(string); } }
form.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>form.html</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <h3> 交友注册 </h3> <form action="/d_request/reg" method="post"> <table> <tr> <td> 用户名: </td> <td> <input type="text" name="username" /> </td> </tr> <tr> <td> 密码: </td> <td> <input type="password" name="password" /> </td> </tr> <tr> <td> 确认密码: </td> <td> <input type="password" name="repassword" /> </td> </tr> <tr> <td> 性别: </td> <td> <input type="radio" name="gender" value="male"> 男 <input type="radio" name="gender" value="female"> 女 </td> </tr> <tr> <td> 出生年月: </td> <td> <input type="text" name="birthday" /> </td> </tr> <tr> <td> 爱好: </td> <td> <input type="checkbox" name="hobbies" value="吹气球"> 吹气球 <input type="checkbox" name="hobbies" value="打篮球"> 打篮球 <input type="checkbox" name="hobbies" value="打乒乓"> 打乒乓 <input type="checkbox" name="hobbies" value="洗澡澡"> 洗澡澡 </td> </tr> <tr> <td> 城市: </td> <td> <select name="city"> <option value="北京"> 北京 <option value="美国"> 美国 <option value="东京"> 东京 </select> </td> </tr> <tr> <td> 个人介绍 </td> <td> <textarea rows="2" cols="50" name="introduction"></textarea> </td> </tr> <tr> <td colspan="2"> <input type="submit" value="注册" /> </td> </tr> </table> </form> </body></html>
0 0
- complex form
- complex
- Complex
- Complex
- complex
- Complex
- 精通CSS-7(simple&complex form)&黑画-5(code city&publish softwore&bug)&R
- Complex Editor
- Class Complex
- Complex 赋值
- Complex类
- Complex类
- complex network1
- complex network2
- complex network3
- Complex Again
- ROOT COMPLEX
- complex类
- Combining Sketch and Tone for Pencil Drawing Production的优化过程
- Group by 和Having 的组合用法
- vi 命令使用--AIX环境下总结
- 利用python,基于SVM实现文本分类
- JAVA HashMap 实现原理
- complex form
- java版斐波那契
- Java内存泄漏分析与解决方案
- 整数划分问题
- “The run destination iOS Device is not valid for running the scheme”
- android AsyncTask 源码剖析
- 删除指定目录下的文件和文件夹
- C++类虚函数内存分布(这个 你必须懂)
- hadoop学习序曲之mysql基础篇--mysql之JDBC