|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to change the background image of a table cell when you put the mouse over it. This is the code I use but changes the WHOLE page's background but I just need to change a table cell's background:
<td onmouseover="document.body.background='images/linkol.gif'; style.cursor='hand'" onMouseOut="document.body.background='';" onClick="location.href='http://www...com'"><a href="http://www...com">News</a></td> ------------------ |
|
#2
|
|||
|
|||
|
This only works in IE4 and above.
<td id="mytd" background="" width="300" height="100" onmouseover="document.all['mytd'].background = 'images/linkol.gif'; style.cursor='hand'" onMouseOut="document.all['mytd'].background ='';" onClick="location.href='http://www...com'"><a href="http://www...com">News</a></td> |
|
#3
|
|||
|
|||
|
and the way you are setting it up 'this' may be a shorter way to write it.
<td background="" width="300" height="100" onmouseover="this.background = 'images/less.gif'; style.cursor='hand'" onMouseOut="this.background ='';" onClick="location.href='http://www...com'"><a href="http://www...com">News</a></td> |
|
#4
|
|||
|
|||
|
Thank you so much! URL
|
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Change cell bg image of table onmouseover |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|