修改当前行 传值

<table>
					<thead>
						<tr>
							<td style=" 40px;">
								<input type="checkbox" id="checkedall" onclick="checkeAll()" />
							</td>
							<td style="">
								账户名称
							</td>
							<td style="">
								账户号
							</td>
							<td style="">
								收款行名
							</td>
							<td style="">
								收款行号
							</td>							
							<td style="">
								转账范围
							</td>
							<td style="">
								收款人属性
							</td>
							<td style="">
								操作
							</td>
							
						</tr>
					</thead>
					<tbody id="tableBody">
						<c:if test="${friendsSize<1}">
							<tr >
								<td colspan="9" align="center">未找到记录</td>
							</tr>
						</c:if>
						<c:if test="${friendsSize>0}">
						<c:forEach var="item" items="${friends}">
							<tr align="center">
								<td><input type='checkBox' name="items" onclick='checkItem();' value='${item.id}' readonly style=' 20px;'></td>
								<td>${item.payeeName=='null'?'--':item.payeeName }</td>
								<td>${item.payeeAccount=='null'?'--':item.payeeAccount }</td>
								<td>${item.inBank=='null'?'--':item.inBank}</td>
								<td>${item.payeebankno=='null'?'--':item.payeebankno}</td>
								<td >
									<c:if test="${item.bankScope==0 }">行内</c:if>
									<c:if test="${item.bankScope==1 }">跨行</c:if>
								</td>
								<td >
									<c:if test="${item.payeeType==0 }">个人</c:if>
									<c:if test="${item.payeeType==1 }">企业</c:if>
								</td>
								<td><a style="cursor: hand;" onclick="openPanel('info',this,'${item.id}');">详情</a> |
									<a style="cursor: hand;" onclick="openPanel('update',this,'${item.id}');">修改</a> | 
									<a onclick="payee_delete('${item.id }')" style="cursor: hand;">删除</a></td>
									
								<td style="0px;">
									<input type="hidden" value="1"/>
									<input type="hidden" value="2"/>
									<input type="hidden" value="3">
									<input type="hidden" value="4">
									<input type="hidden" value="5">
									<input type="hidden" value="6">
								</td>
							</tr>
						</c:forEach>
						</c:if>
					</tbody>
				
				</table>




		var tr =obj.parentNode.parentNode;
                                     alert(id);
 		alert(tr.childNodes[3].innerHTML);
 		alert(tr.childNodes[5].innerHTML);
		alert(tr.childNodes[17].childNodes[1].value);//td里面的隐藏域值
		alert(tr.childNodes[17].childNodes[3].value);

  

原文地址:https://www.cnblogs.com/yangy608/p/2171145.html