how to get dynamic table row index in javascript