+ 1
Can somebody please explain me what is the function of ".innerHTML" in JavaScript??
I want to know what it does and how it works. Please help me out.
2 Answers
+ 2
it's property used in changing the innerTexts of Dom elements
<div>hello</div>
div=document.querySelector("div");
//getting the div element
div.innerHTML="love"
then html should look like
<div>love</div>
+ 1
Thanks..