Can someone tells my why in JS, document. getElementById("test"); returns null?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone tells my why in JS, document. getElementById("test"); returns null??

I made a Web Code, in html I have a <button> in a table cell that have the id="test" but when I try to get it in JS code with the function document.getElementById("test") it returns null

24th Jan 2021, 3:08 PM
Khalil Galalem
Khalil Galalem - avatar
1 Answer
24th Jan 2021, 3:11 PM
Ipang