How to Rewrite Text and Controls


To rewrite text and controls in HTML, you can use the innerHTML method.
You must have either a table or a div object that has an ID so that all text inside that object can be updated.

It should look like this:

<TABLE BORDER="0" WIDTH="200">
<TD ID="name1" BGCOLOR="#FFFFCC">
</TD>
</TABLE>


Now lets add a link that alters the text inside the table.

<A HREF ONMOUSEOVER="name1.innerHTML='<b> More Text</b>'" ONMOUSEOUT="name1.innerHTML='Less Text'"> Try it here! </A>


Try it here!