$(function() {
$("#AddButton").click(function(){
$("input[name='radio'][checked]").each(function(){
if($(this).attr("checked"),true){
ccode=$(this).val();
window.location.href='main/tinitiator/add.jsp?radioid='+ccode; };
});
});
}); <table align="center" border="1" class='cTable table tCenter' width="50%">
<tr align="center" class='cTitle toolbarBg'>
<td>序号</td>
<td>单位编号</td>
<td>单位名称</td>
<td>地区代码</td>
</tr>
<c:if test="${!empty pm.datas}">
<s:iterator value="pm.datas" var="tunit">
<tr align="center">
<td><input type="radio" name="radio" id="radioid" value="${tunit.ccode}"/></td>
<td>${tunit.ccode}</td>
<td>${tunit.name}</td>
<td>${tunit.area}</td>
</tr>
</s:iterator>
</c:if>
<tr>
<c:if test="${empty pm.datas}">
<td colspan="8" align="center">
没有找到相应的记录
</td>
</c:if>
</tr>
</table>另一个页面获取 <tr bgColor=#ffffff>
<td align="right" width="20%" height="25" valign="middle">
所属单位:
</td>
<td colspan="2" width="20%" height="25">
<input type="text" id="ccodeid" name="${tinitiator.TUnit.name}" value="<%=request.getParameter("radioid")%>" readonly="readonly"/>
</td>
</tr> 各位大哥 大姐 看看这样获取值对不对啊!
$("#AddButton").click(function(){
$("input[name='radio'][checked]").each(function(){
if($(this).attr("checked"),true){
ccode=$(this).val();
window.location.href='main/tinitiator/add.jsp?radioid='+ccode; };
});
});
}); <table align="center" border="1" class='cTable table tCenter' width="50%">
<tr align="center" class='cTitle toolbarBg'>
<td>序号</td>
<td>单位编号</td>
<td>单位名称</td>
<td>地区代码</td>
</tr>
<c:if test="${!empty pm.datas}">
<s:iterator value="pm.datas" var="tunit">
<tr align="center">
<td><input type="radio" name="radio" id="radioid" value="${tunit.ccode}"/></td>
<td>${tunit.ccode}</td>
<td>${tunit.name}</td>
<td>${tunit.area}</td>
</tr>
</s:iterator>
</c:if>
<tr>
<c:if test="${empty pm.datas}">
<td colspan="8" align="center">
没有找到相应的记录
</td>
</c:if>
</tr>
</table>另一个页面获取 <tr bgColor=#ffffff>
<td align="right" width="20%" height="25" valign="middle">
所属单位:
</td>
<td colspan="2" width="20%" height="25">
<input type="text" id="ccodeid" name="${tinitiator.TUnit.name}" value="<%=request.getParameter("radioid")%>" readonly="readonly"/>
</td>
</tr> 各位大哥 大姐 看看这样获取值对不对啊!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货