Is document.getElementbyId a thing here? I keep getting errors saying it isnt a method/function. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is document.getElementbyId a thing here? I keep getting errors saying it isnt a method/function.

14th May 2020, 11:10 PM
Josh Zaphyrr
Josh Zaphyrr - avatar
2 Answers
+ 4
getElementById Notice the "By" here uses uppercase letter 'b'
14th May 2020, 11:17 PM
Ipang
+ 4
Also, try wrapping your JS in: window.onload = function () { document.getElementById("element"); }
14th May 2020, 11:18 PM
ChaoticDawg
ChaoticDawg - avatar