I want to play sound onclick event. I have code in which i can play sound in Firefox and other browser but not in safari.
Below is the code. Safari gives me the error like "thissound.Play" [undefined ] is not a function
.
function EvalSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
<embed src="namaste_london01(www.songs.pk).mp3" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">
<a href="#" onClick="EvalSound( sound1 )"> Play </a>
提前感谢。