日期:2014-05-20  浏览次数:20614 次

jquery获取table表中的某一行数据内容
jquery获取table表中的某一行数据内容.table表中的内容是从数据库中动态获取的

------解决方案--------------------
document.getElementById("tableId").rows[i].cell[i] 根据序列

------解决方案--------------------
JScript code
<html>
<head>
<script>
function click(p){
  alert(p.cells[0].innerHTML);
}
</script>
</head>
<body>
<table><tr onclick="click(this)"><td>1</td></tr>
<tr onclick="click(this)"><td>2</td></tr>
<tr onclick="click(this)"><td>3</td></tr>
<tr onclick="click(this)"><td>4</td></tr>
</table>
</body>
</html>