06-02-2009, 02:30 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: May 2009
Location: lagos, nigeria
Posts: 13
Thanks: 9
|
Sound only works in Internet Explorer
html4strict Code:
<html><head><title>Sound Test </title><script language="JavaScript" type="text/javascript">function PlaySound() { var sound = document.getElementById("track"); sound.Play(); } </script></head><body><h1>Sound Test </h1><embed id="track" src="song.mp3" width="0" height="0" autostart="false" enablejavascript="true"/> <input type="button" value="Play the Sound" onClick="PlaySound()"> </body></html>
The problem with this code is that it works with IE but it doesn't work with Firefox and opera,even when I used the DoPlay() function it only works
once it does not replay
Last edited by Wildhoney : 06-02-2009 at 03:37 PM.
|
|
|
|