innerHTML

Using JavaScript to replace a block of HTML code in a loaded page with new code.

Original text in a div with ID ChangeIt. Click to change

SOURCE CODE:
<div id="ChangeIt">Original text in a div with ID ChangeIt.
<a href="javascript:document.getElementById('ChangeIt').innerHTML='New code replaced old code (refresh to try again)'">Click to change</a>
</div>