I’ve got a checkbox nested inside a table cell element in HTML. How can I access the inner checkbox from Javascript? All of the examples I’ve seen alter the inner HTML itself, or the visual properties, which is not what I’m interested in. I’ve tried the childNodes array, but it’s empty, apparently.
Share
If you are not using jQuery then you could do:
And then cycling through them to find one that is checkbox and parentNode is table cell.
Or very simply add ID to that checkbox.