0

What I need : Getting an Element that has checked checkbox children with only selector.

Actually I can retrieve the inputs as follows

 document.querySelectorAll('tr>td>input[type=checkbox]:checked')

I would like to know if there is a way to retrieve the "tr" element without having to cycle through the various input elements and retrieve the closest parent

gaspx
  • 36
  • 4
  • can you share the html? – brk Jul 01 '21 at 12:10
  • Please visit [help], take [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output, preferably in a [Stacksnippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) – mplungjan Jul 01 '21 at 12:10
  • could you explain what do you mean by "with only selector"? – Delowar Hosain Jul 01 '21 at 12:11

0 Answers0