后台request.getparameter ("radio选中的项)得不到值 15
<formid="formTrail"method="post"action="addReplicatTrail.do"><divid="top"><tablewidth...
<form id="formTrail" method="post" action="addReplicatTrail.do">
<div id="top">
<table width="526">
<tbody><tr border="1" bgcolor="#CDCDC1">
<td width="127" rowspan="2"><strong>TrailFile</strong></td>
<td width="99" rowspan="2"><strong>ExtractName</strong></td>
<td width="45" rowspan="2"><strong>SeqNo</strong></td>
<td width="36" rowspan="2"><strong>RBA</strong></td>
<td width="80" rowspan="2" align="center"><strong>FileSize</strong></td>
</tr>
<tr border="1" bgcolor="#CDCDC1">
<td width="111" colspan="12" align="center"><strong>Operation</strong></td>
</tr>
<tr id="row0" bgcolor="#DBDBDB">
<td>./dirdat/ss </td>
<td>PAAA </td>
<td>0 </td>
<td>0 </td>
<td>200M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/ss"></td>
</tr>
<tr id="row1">
<td>./dirdat/co </td>
<td>PCOLMAP </td>
<td>12 </td>
<td>1515 </td>
<td>300M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/co"></td>
</tr>
<tr id="row2" bgcolor="#DBDBDB">
<td>./dirdat/bb </td>
<td>PUMP1 </td>
<td>0 </td>
<td>0 </td>
<td>100M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/bb"></td>
</tr>
</tbody></table>
</div>
<div><a href="#" onclick="submitTrailForm()"><img src="/gg/images/enter.gif" id="enter" border="0" align="absmiddle" width="51" height="22"></a></div>
</form> 展开
<div id="top">
<table width="526">
<tbody><tr border="1" bgcolor="#CDCDC1">
<td width="127" rowspan="2"><strong>TrailFile</strong></td>
<td width="99" rowspan="2"><strong>ExtractName</strong></td>
<td width="45" rowspan="2"><strong>SeqNo</strong></td>
<td width="36" rowspan="2"><strong>RBA</strong></td>
<td width="80" rowspan="2" align="center"><strong>FileSize</strong></td>
</tr>
<tr border="1" bgcolor="#CDCDC1">
<td width="111" colspan="12" align="center"><strong>Operation</strong></td>
</tr>
<tr id="row0" bgcolor="#DBDBDB">
<td>./dirdat/ss </td>
<td>PAAA </td>
<td>0 </td>
<td>0 </td>
<td>200M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/ss"></td>
</tr>
<tr id="row1">
<td>./dirdat/co </td>
<td>PCOLMAP </td>
<td>12 </td>
<td>1515 </td>
<td>300M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/co"></td>
</tr>
<tr id="row2" bgcolor="#DBDBDB">
<td>./dirdat/bb </td>
<td>PUMP1 </td>
<td>0 </td>
<td>0 </td>
<td>100M </td>
<td colspan="12" align="center"><input type="radio" name="trailName1" value="./dirdat/bb"></td>
</tr>
</tbody></table>
</div>
<div><a href="#" onclick="submitTrailForm()"><img src="/gg/images/enter.gif" id="enter" border="0" align="absmiddle" width="51" height="22"></a></div>
</form> 展开
展开全部
request.getparameter ("trailName1")肯定是可以获得的。
先排除两个可能的因素:
1.先将表格样式去除试一下:即只用
<input type="radio" name="trailName1" value="./dirdat/ss">
<input type="radio" name="trailName1" value="./dirdat/co">
<input type="radio" name="trailName1" value="./dirdat/bb">
然后用request.getparameter ("trailName1")常识是否能够获取
2.改一下value的值试一下能否获取,即
<input type="radio" name="trailName1" value="1">
<input type="radio" name="trailName1" value="2">
<input type="radio" name="trailName1" value="3">
如果还不能获取,那就是其他原因,request.getparameter ("trailName1")一定是可以用的,有成功用例。
先排除两个可能的因素:
1.先将表格样式去除试一下:即只用
<input type="radio" name="trailName1" value="./dirdat/ss">
<input type="radio" name="trailName1" value="./dirdat/co">
<input type="radio" name="trailName1" value="./dirdat/bb">
然后用request.getparameter ("trailName1")常识是否能够获取
2.改一下value的值试一下能否获取,即
<input type="radio" name="trailName1" value="1">
<input type="radio" name="trailName1" value="2">
<input type="radio" name="trailName1" value="3">
如果还不能获取,那就是其他原因,request.getparameter ("trailName1")一定是可以用的,有成功用例。
展开全部
你这样提交好像是取不到,你写一个JS,在JS 里面取到radio选中的值了,把值写到URL 里面,直接用URL提交
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
第一次听说form里的表单内容还要给JS才能提交,你先别用action,用servlet试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询