日期:2014-05-18  浏览次数:20768 次

radio怎么获得值阿??????????????
我想得到两个文本框的值,怎么获得???
我只能获得一个文本框的内容,以各文本框时只有rq能输出来,两个的时候怎么只有一个了,而且是后面的文本框。。。。。。。。。。。。。。。。。。
代码:

<%
out.print(request.getParameter( "rq ")+ "============================== ");
out.print(request.getParameter( "rq1 ")+ "============================== ");
%>
<form   action= " "   method= "post ">
<table>
<tr>
<td> <input   name= "meclick "   type= "radio "   value= " "> </td>
<td> <input   name= "rq "   onFocus= "str_date() "   readonly= "true "   type= "text ">
</td>
</tr>
<tr>
<td> <input   name= "meclick "   type= "radio "   value= " "> </td>
<td> <input   name= "rq "   onFocus= "str_date() "   readonly= "true "   type= "text "> 之前 </td>
</tr>
<tr>
<td> <input   name= "meclick "   type= "radio "   value= " "> </td>
<td> 从
<input   name= "rq "   onFocus= "str_date() "   readonly= "true "   type= "text "> 到 <input   name= "rq1 "   onFocus= "str_date() "   readonly= "true "   type= "text "> </td>
</tr>
<tr>
<td> <input   name= "meclick "   type= "radio "   value= " "> </td>
<td> <input   name= "rq "   onFocus= "str_date() "   readonly= "true "   type= "text "> 之后 </td>
</tr>
</table>
</form>

------解决方案--------------------
String rq[] = request.getParameterValues( "rq ");
for(int i = 0;i <rq.length;i++)
out.print(rq[i]+ "============================== ");
------解决方案--------------------
同意楼上的
------解决方案--------------------
net_lover 方法不错, 我建议存到list