New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact


<bgsound src="#" id="soundeffect" loop=1 autostart="true" />

<script type="text/javascript">

* JavaScript Sound effect- Dynamic Drive DHTML code library (
* Visit for hundreds of DHTML scripts
* This notice must stay intact for legal use

var soundfile="sidebar.wav" //path to sound file, or pass in filename directly into playsound()

function playsound(soundfile){
if (document.all && document.getElementById){
document.getElementById("soundeffect").src="" //reset first in case of problems

function bindsound(tag, soundfile, masterElement){
if (!window.event) return
var source=event.srcElement
while (source!=masterElement && source.tagName!="HTML"){
if (source.tagName==tag.toUpperCase()){




<a href="#" onMouseover="playsound(soundfile)">Example 1</a>

<a href="#" onMouseover="playsound('different.wav')">Example 2</a>

<div id="coolmenu" onMouseover="bindsound('A', soundfile, this)">
<a href="">CSS Drive</a>
<a href=""">Dynamic Drive</a>
<a href="">JavaScript Kit</a>
<a href="">Wired news</a>
<a href="">Coding Forums</a>