free web site traffic and promotion

Thursday, 5 July 2012

Play Sound on Mouseover (IE)

Here's a short example of how to play a sound wav on mouseover in an html page...
Unfortunately, this only seems to work in Internet Explorer (I prefer Firefox myself).
But here's the code...

Copy Code|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<html> <head> </head> <body> <embed name="sound" src="yoursound.wav" loop="false" autostart="false" hidden="true"> <a href="http://www.yourwebsite.com" onmouseover="javascript:self.document.sound.play();" onmouseout="javascript:self.document.sound.stop();">Mouseover For Sound</a> </body> </html>
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

0 comments:

Post a Comment