change bg-Image onMouseOver

M

Martin Nadoll

Hello,

is it possible to change the bg-Image of a <td>-tag onMouseOver?
maybe with javaScript or with css?

Thzankis for any help,
Martin Nadoll
 
T

Thomas 'PointedEars' Lahn

Martin said:
is it possible to change the bg-Image of a <td>-tag onMouseOver?

You mean the background image of a HTML "td" element.
maybe with javaScript or with css?

Yes, it is. That's a FAQ, please search before you post.

HTML + J(ava)Script/ECMAScript:

<td
style="background-image:url(...)"
onmouseover="if (typeof this.style != "undefined"
&& typeof this.style.backgroundImage != "undefined")
{
this.style.backgroundImage = 'url(...)';
}">

<OT>

CSS:

td:hover {
background-image:url(...);
}

</OT>


HTH

PointedEars

P.S.: de.comp.lang.javascript exists.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top