/    Sign up×
Community /Pin to ProfileBookmark

Need some help with OnClick

Hello all.

I was wondering if some things were possible using JavaScript…
First of all, is it possible to change the picture of a link when you use OnClick?
For example, say I have MouseOut set to one picture, MouseOver set to another, but the picture is linked to a page and I want the picture to change once more when I click it.

Also, is it possible to embed a sound into MouseOver? Say if I want the webpage to play a sound everytime the mouse is put over the picture?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMay 12.2006 — Anything you can do in onmouseover can be done in onclick. As for sounds, you can do what you've described -- whether it actually plays the sound is dependent upon the browser. In fact, such code has been posted in this forum. Just use the forum search feature to find it.
Copy linkTweet thisAlerts:
@thekofauthorMay 12.2006 — Alright, thanks, I just needed confirmation. All I need to do now is search for that code (for the sound) and try it out.
×

Success!

Help @thekof 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.17,
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,
)...