change bg-Image onMouseOver

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Nadoll

    change bg-Image onMouseOver

    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


  • Thomas 'PointedEars' Lahn

    #2
    Re: change bg-Image onMouseOver

    Martin Nadoll wrote:
    [color=blue]
    > is it possible to change the bg-Image of a <td>-tag onMouseOver?[/color]

    You mean the background image of a HTML "td" element.
    [color=blue]
    > maybe with javaScript or with css?[/color]

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

    HTML + J(ava)Script/ECMAScript:

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

    <OT>

    CSS:

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

    </OT>


    HTH

    PointedEars

    P.S.: de.comp.lang.ja vascript exists.

    Comment

    Working...