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