+ 1
What is the use of document.getelementById?
3 Answers
+ 1
Select specific tag element of html .Example:-
<p id="hello"></p>
In js
var a=document.getElementById("hello");
a.innerHTML=document.write("My name");
.It will call p tag using id attribute and then manipulate it to finally print
My name.
+ 7
Kumaran it's document.getElementById()
You can go to: https://www.w3schools.com/jsref/met_document_getelementbyid.asp
Hope this helpful! Programming is fun! đ
+ 7
Kumaran rmb that js is case sensitiveđ