首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

jsp传值有关问题

2012-01-21 
jsp传值问题源码如下c:forEachitems ${trfm_fn:getParticularTrfm(param.currentUserID,param.begin_da

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。

热点排行