I have a table like the following:
You can use object.rowIndex property which has an index starting at 0.
object.rowIndex
$("table tr").click(function(){ alert (this.rowIndex); });
See a working demo