Code:<font color="red"> <span><OnMouseOver="this.style.color="blue""> hello</span> </font>
Code:<font color="red"> <span><OnMouseOver="this.style.color="blue""> hello</span> </font>
Try this code
Code:<font color="red"> <span onmouseover="this.style.color='blue';return false;" onmouseout="this.style.color='red';return false;"> hello </span></font>
The font tag for one, it has been deprecated. As a result, its influence over this sort of scheme is unwelcome. In your case, possibly overriding the javascript event. Also, you have quotes within quotes in your event, this will make the browser see your event as:
The event should be an attribute to the span tag, not a separate tag. Camel style notation for mouse events is not required and is not forward compatible. Try:Code:OnMouseOver="this.style.color="
Code:<span style="color:red;" onmouseover="this.style.color='blue';"> hello</span>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
ty schuer
Why cling to the deprecated font tag? Why return false? If you want to return the span to its original color on mouse out, I would do this in a style block in the head of the page or in a stylesheet linked to it:Originally Posted by sandman2006
Then for the markup:Code:span.h_over { color:red; }
HTML Code:<span class="h_over" onmouseover="this.style.color='blue';" onmouseout="this.style.color='';">hello</span>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks