jsp中这段代码为什么input type=text取值为null,而selectr可以正常取值?

hello.jsp<%@pagecontentType="text/html;charset=gb2312"%><html><head><title>firstJSPpa... hello.jsp
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>first JSP page</title>
</head>
<%@include file="head.jsp"%>
<body>
Hello, good evening!
<form action="response.jsp" method="post">
<table align="center" width=780>
<tr><td>请输入用户名:</td>
<td><input Type="text",name="username"></td></tr>
<tr><td>请输入该密码:</td>
<td><input Type="password",name="password",value="v"></td></tr>
<tr><td><input Type="submit",name="提交",value="v"></td>
<td><input Type="reset"</td></tr>

<tr><td><select name="choose">
<option value="you" selected>you</option>
<option value="me">me</owption>
<option value="her">her</option></td>
<td></td></tr>
</form>
</body>
</html>

response.jsp
<%@page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.*"%>
<% request.setCharacterEncoding("gb2312");%>
<h3>您好:

<%=request.getParameter("username") %>,测试另一取值:<%=request.getParameter("choose") %>[<a href="logout.jsp">注销</a>]</h3>
展开
 我来答
百度网友97feaaf
2014-07-17 · 超过60用户采纳过TA的回答
知道小有建树答主
回答量:214
采纳率:0%
帮助的人:112万
展开全部
<td><input Type="text",name="username"></td></tr>
怎么有逗号?
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式