You are here: irt.org | FAQ | DHTML | Q849 [ previous next ]
Try the following:
<SCRIPT LANGUAGE="JavaScript"><!--
function high(what,text) {
changeContent(what,'<DIV STYLE="color:red;">' + text + '<\/DIV>');
}
function low(what,text) {
changeContent(what,text);
}
function changeContent(what,text) {
if (document.layers) {
what.document.open();
what.document.write(text);
what.document.close();
}
}
//--></SCRIPT>
<P>
<DIV onMouseOver="this.style.color='red'"
onMouseOut="this.style.color='black'">
<LAYER onMouseOver="high(this,'Move the mouse pointer over this text')"
onMouseOut="low(this,'Move the mouse pointer over this text')">
Move the mouse pointer over this text
</LAYER>
</DIV>
</P>