当前位置: 代码迷 >> Java Web开发 >> jsp传值有关问题
  详细解决方案

jsp传值有关问题

热度:96   发布时间:2016-04-17 17:15:42.0
jsp传值问题
源码如下
<c:forEach   items= "${trfm_fn:getParticularTrfm(param.currentUserID,param.begin_date,param.end_date)} "   var= "current "   varStatus= "status ">
<tr   class= "tr_bg1 ">
<c:choose>
<c:when   test= "${status.first} ">
<td   width= "20 "> <input   checked   name= "docId "   type= "radio "   value= "${current.docId} "> </td>
</c:when>
<c:otherwise>
<td   width= "20 "> <input   name= "docId "   type= "radio "   value= "${current.docId} "> </td>
</c:otherwise>
</c:choose>
<c:set   value= "${union_fn:getProDetail(current.pjtId)} "   var= "current1 "/>
<c:set   var= "pjtName "   value= "${current1.projectName} "/>
<td   width= "80 "> <c:out   value= "${pjtName} "/> </td>
<td   width= "80 "> <c:out   value= "${current.applyDate} "/> </td>
<td   width= "80 "> <c:out   value= "${current.allMoney} "/> </td>
<input   type= "hidden "   name= "allMoney "   value= "${current.allMoney} ">
<c:choose>
<c:when   test= "${current.applyStatus==0} ">
<td   width= "80 "> <c:out   value= "提交 "/> </td>
</c:when>
<c:when   test= "${current.applyStatus==1} ">
<td   width= "80 "> <c:out   value= "审批中 "/> </td>
</c:when>
<c:when   test= "${current.applyStatus==2} ">
<td   width= "80 "> <c:out   value= "确认 "/> </td>
</c:when>
<c:when   test= "${current.applyStatus==3} ">
<td   width= "80 "> <c:out   value= "否认 "/> </td>
</c:when>
</c:choose>
<input   type= "hidden "   name= "pjtname "   value= "${pjtName} ">
<input   type= "hidden "   name= "reason "   value= "${current.reason} ">
<c:set   var= "count "   value= "${count+1} "/>
</c:forEach>
我想得到被选中的docId的allmoney值,传到下一个页面,在线等

------解决方案--------------------
用js遍历checkbox,然后可以通过url提交给下一个页面,也可以设置另一个hidden的值为这个选定值,再提交给下一页。
------解决方案--------------------
编写radio的onselect事件,把该radio对应的allmoney值赋给一个hidden。
  相关解决方案