[Solved] Coloring random color table of tr and td [duplicate]
You can’t just access DOM elements like properties in javascript. To get DOM elements, the easiest way is to use the querySelector() or querySelectorAll() methods. ( See the documentation here: https://developer.mozilla.org/de/docs/Web/API/Document/querySelector ) In your case, you would get all td elements like this: var x = document.querySelectorAll(‘table td’); which will return a NodeList containing all … Read more