Hello I need my code colour highlights to function more than once on a page, I am using a javascript string but with ID but this doesn’t duplicate it, it only works for the first ID then the second and third don’t work I have tried using CLASS but this doesn’t work either any help would be much appreciated…
w3CodeColor(document.getElementById("mycode"));
w3CodeColor(document.getElementsByClassName("mycode"));
Both of these don’t work
This is what I have tried already
`
w3CodeColor(document.getElementsById("mycode"));
w3CodeColor(document.getElementsByClassName("mycode"));
New contributor
Jay1981 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.