Click to See Complete Forum and Search --> : How do I change text on mouse over on a button?


jammer20002
09-01-2003, 05:40 PM
Can someone tell me how I can chnage some text when a mouse is placed over a button?

I've got code to change images when the mouse is put over a button, but I'd also like to do this for text as well.

Thanks.


Jam

Khalid Ali
09-01-2003, 06:09 PM
The snippet below should do what you are looking for

<input type="button" onmouseover="this.value='Over'" onmouseout="this.value='Out'" value="Out"/>

jammer20002
09-01-2003, 06:20 PM
Sorry... I think I described what I wanted wrong. :)
I have a picture, say.
When the mouse is put over the picture, I want text below to change to something different.

I know it must be simple... but I'm pulling my hair trying to get it to work!

THANKS.

Khalid Ali
09-01-2003, 06:38 PM
try this link

http://www.webapplikations.com/pages/html_js/image_examples/SimpleImageSwap.html