onclick="playSound('UrlToSoundFile');">Click here to hear a soundonmouseover="playSound('UrlToSoundFile');">Mouse over this text to hear a sound
Example of How to Play a Sound on Click or on MouseOver function playSound(soundfile) { document.getElementById("dummy").innerHTML= ""; }onclick="playSound('zbluejay.wav');">Click here to hear a bird sing
onmouseover="playSound('zbluejay.wav');">Or you can put your mouse over this paragraph to hear the same bird sound.