0
中的RowIndex我使用以下JavaScript獲取tr
元素中的rowindex,請建議。我被困在這個代碼中。提前致謝。如何查找表
<script>
function jsmethod(a)
{
var row = document.getElementById("trHead");
alert(row.children[0].rowIndex);
}
</script>
<tr id='trHead' onclick='jsmethod(this);'>
<td> <a href='#' >Select</a></td>
<td>{$row['ecode']}</td> <td> echo $row[0];</td>
<td>{$row['first_name']} {$row['middle_name']} {$row['last_name']}</td>
<td>{$row['father_name']}</td> <td>{$row['mother_name']}</td>
<td>{$row['number_of_dependents']}</td> <td>{$row['dob']}</td>
<td>{$row['gender']}</td> <td>{$row['identification_mark']}</td>
<td>{$row['marital_status']}</td> <td>{$row['spouse_name']}</td>
<td>{$row['mobile_number']}</td> <td>{$row['email_id']}</td>
<td>{$row['adhar_id']}</td> <td>{$row['pan_number']}</td>
<td>{$row['passport_number']}</td> <td>{$row['tin_number']}</td>
<td>{$row['dl_number']}</td>
</tr>