Difference between document. Write and inner.html
Answers
Answered by
1
Answer:
document.write():
It puts the content directly to the web browser where you need.
.innerHTML:
If you have already a HTML document then you use the .innerHTML in your document
Explanation:
Example:
document.write("These contents directly visible to web browser");
document.getElementById("Example").innerHTML = "Sample Text.";
Similar questions