jsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>login in</title>
</head>
<body>
<!--将数据传输到index.jsp -->
<form action="index.jsp" method="post">
姓名:<input type="text" name="username" placeholder="username"><br><!--输入姓名-->
密码:<input type="password" name="password" placeholder="password"><br><!--输入密码-->
性别:<input type="radio" name="Sex" value="male">Male
<input type="radio" name="Sex" value="man">Female<br><!--输入密码-->
血型:<input type="radio" name="Blood" value="O">O
<input type="radio" name="Blood" value="A">A
<input type="radio" name="Blood" value="B">B
<input type="radio" name="Blood" value="AB">AB<br><!--输入血型-->
性格:<input type="checkbox" name="character" value="热情大方">热情大方
<input type="checkbox" name="character" value="温柔体贴">温柔体贴
<input type="checkbox" name="character" value="多愁善感">多愁善感<br><!--输入性格-->
简介:<textarea name="introduction" cols="30" rows="8"></textarea><br><!--输入简介-->
城市:<select name="city"><!--输入城市-->
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="广州">广州</option>
<option value="深圳">深圳</option>
<option value="杭州">杭州</option>
<option value="南京">南京</option>
<option value="苏州">苏州</option>
<option value="成都">成都</option>
<option value="武汉">武汉</option>
<option value="重庆">重庆</option>
<option value="西安">西安</option>
<option value="郑州">郑州</option>
</select><br>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<%@ page contentType="text/html; charset=UTF-8" %>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login in</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
String strUserName = request.getParameter("username");
String strUserPwd = request.getParameter("password");
String strUserSex = request.getParameter("Sex");
String strUserBlood = request.getParameter("blood");
String strUserChar = request.getParameter("chatacter");
String strUserIemo = request.getParameter("iemo");
String strUserCity = request.getParameter("city");
%>
<%--创建一个七行两列的表格--%>
<table border="2" width="30%" height="20px">
<tr>
<td>your name is :</td>
<td><%=strUserName%>
</td>
</tr>
<tr>
<td>your password is :</td>
<td><%=strUserPwd%>
</td>
</tr>
<tr>
<td>your Sex is :</td>
<td><%=strUserSex%>
</td>
</tr>
<tr>
<td>your Blood is : </td>
<td><%=strUserBlood%>
</td>
</tr>
<tr>
<td>our strUserChar is :</td>
<td><%=strUserChar%>
</tr>
<tr>
<td>your iemo is :</td>
<td><%=strUserIemo%>
</td>
</tr>
<tr>
<td>your city is :</td>
<td><%=strUserCity%>
</td>
</tr>
</table>
</body>
</html>