I am trying to create an onclick function that returns the row and column of a clicked cell from a table in JavaScript without using jQuery. I will still return the column, but I cannot figure out how to get it to return a row.
**cellToAppend.addEventListener("click", clicked);**
**function clicked() {
alert("clicked cell at: " + (this).cellIndex + ", ");
}**
source
share