Highlighting the Elements

You can have text effects with an OnMouse event when a specific HTML tag is used.

<P>Pass your mouse over this example line of text</P>

The script identifies the HTML tag with the line:

event.srcElement.tagName=='P'

Then uses Style attributes to create the effect.

event.srcElement.style.color="#FFFFFF"

All paragraphs will now highlight in white onmouseover
You can change this to almost any tag of your choosing and use a variety of Style attributes

For moz e.target.parentNode.nodeName is used.

<script type="text/javascript">
<!--
moz=document.getElementById&&!document.all function lightit(e){ tag_type=(!moz?event.srcElement.tagName:e.target.parentNode.nodeName) tag_col=(!moz?event.srcElement:e.target.parentNode) if (tag_type=='P') { tag_col.style.color="#FFFFFF" //use for font colour //tag_col.style.backgroundColor="#FFFFFF" //use for background colour //tag_col.style.backgroundImage="url(../style/devil.gif)" //use for background image } } function unlightit(e){ tag_type=(!moz?event.srcElement.tagName:e.target.parentNode.nodeName) tag_col=(!moz?event.srcElement:e.target.parentNode) if (tag_type=='P') { tag_col.style.color="" //use for font colour //tag_col.style.backgroundColor="" //use for background colour //tag_col.style.backgroundImage=""//use for background image } } document.onmouseover=lightit; document.onmouseout=unlightit; //--> </script>