Colour changes of a table cell when mouse travels over it

Please find below an exhert of one of my HTML programs:

<table bgcolor="#0047D5" bordercolor="#BOFFFF" border="5" cellspacing="5" cellpadding"5">            
<a href="index.html" target="_top"><td align="center"><font color="YELLOW">Homepage</font></td></a></tr>

I know that I need to use onMouseover and onMouseout to make this cell change when the mouse is placed over it but I can't work out how.

How do I attach an explanation to what the button does when the mouse goes over it.

Thanks very much in advance.

Simon Wallace
Who is Participating?
dspletsConnect With a Mentor Commented:
In Netscape it's not possible!  The following script will solve your two problems.

1. The information when you move your cursor over an hyperlink can you show with the title-attribute.

2. The text changing when you move the cursor over it cann you solve with a little bit CSS and javascript.


<style> {color:red} {color:green}

<script language="javascript">
function change(test)

function changeaf(test)

<title>New Page 1</title>

<table bgcolor="#0047D5" bordercolor="#BOFFFF" border="5" cellspacing="5" cellpadding"5">
<td align="center"><a href="index.html" target="_top" name="link" title="click here" class="green" onmouseover="javascript:change(this)" onmouseout="javascript:changeaf(this)" >Homepage</a></td></tr>


Button does not support the onMouseover nor the onMouseout event handler. A possible solution is using an image instead of a button. Then you can add the alt property (hint box) which displays the text you want.


<input type="image" src="myimage.gif" alt="this text will be shown after hovering for a few secs">

So you could use a button like image for this. You can use the onClick event handler or other event handlers with this of course.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.