So I have this table, and when I click on a td I would like to know where is that(which row and cell) without any attributes on the elements.
td
&l
Well, When you have rowspan/colspan you can have a lot more fun, however, if the grid is regular, you can just determine your position from the index by doing:
row = Math.floor(i / rows); column = i % columns;