<html>
<head>
<script>
function displayResult(x)
{
alert("Row index is: " + x.rowIndex);
}
</script>
</head>
<body>
<table border="1">
<tr onclick="displayResult(this)">
<td>Click to show rowIndex</td>
</tr>
<tr onclick="displayResult(this)">
<td>Click to show rowIndex</td>
</tr>
<tr onclick="displayResult(this)">
<td>Click to show rowIndex</td>
</tr>
</table>
</body>
</html>