#HTML <tr class="odd"> <td>...</td> <td>...</td> <td>...</td> </tr> <tr class="even"> <td>...</td> <td>...</td> <td>...</td> </tr>
When clicking on a cell in the table, it is necessary to go up the DOM model and find the first element encountered and get all the information from it, i.e. contents of child fields. Tried to do the following, but returns an Object object, or undefined, if I specify an index
(this).onclick = function(){ var a = $(this).parent().find("tr").val() alert(a)}
How can you implement an idea?