innerHTML is useful for returning or replacing the content of HTML elements.
When you use innerHTML, you can change the page's content without refreshing the page. This can make your website feel quicker and more responsive to user input.
Syntax:
document.getElementById('{ID of element}').innerHTML = '{content}';
Example:
This will be replaced when you click the button - Replace Me
nice sir!
ReplyDelete