/    Sign up×
Community /Pin to ProfileBookmark

How do I change text on mouse over on a button?

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

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliSep 01.2003 — The snippet below should do what you are looking for

<input type="button" onmouseover="this.value='Over'" onmouseout="this.value='Out'" value="Out"/>
Copy linkTweet thisAlerts:
@jammer20002authorSep 01.2003 — 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.
×

Success!

Help @jammer20002 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...