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
Political Science,
6 months ago
Chemistry,
6 months ago
Political Science,
6 months ago
English,
1 year ago
Biology,
1 year ago
Biology,
1 year ago