- 1
Code playground popping up errors when i input the EXACT code that the SoloL. tutorial told me to
I kind of get what is happening, the js is running before the html structure exists. Is it just the "side by side" function of the Code Playground? using Here's the "sim ple" code: window.onload = function() { var elem = document.getElementsByClassName("a").value; elem.innerHTML='FOUND YOU!!'; }; in the html i am using 2 <div structures with class of a... finally got it to stop calling errors but the inner html thing dont do crap! so what do i do?
3 Answers
+ 3
ClassName returns a list of elements so try elem[0].innerHTML
+ 1
swimin through bugs but im getting it. thanks for getting back to me!!
0
Post code so we can answer you