Ciao Ragazzi...scusate per la mia poca esperienza e per la domanda banale che vi pongo.
Creando un sito web ed inserendo tra i tag :
<head>
<script type="text/javascript">
function PlaySound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
function StopSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Stop();
}
</script>
Nei tag <body>
ho creato dei psudo tasti "on" e "off":
<a href="#" title="On" style="text-decoration: none;" onClick="PlaySound('sound1')">On</a>
<a href="#" title="Off" style="text-decoration: none;" onClick="StopSound('sound1')">Off</a>
ed infine ho inserito questa stringa:
<embed src="musica.mp3" autostart="true" width="0" height="0" name="sound1" loop="true" enablejavascript="true">
Ho notato delle anomalie con alcuni browser.
Domanda? Perchè funziona tutto con Explore mentre con Chrome no!
Creando un sito web ed inserendo tra i tag :
<head>
<script type="text/javascript">
function PlaySound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
function StopSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Stop();
}
</script>
Nei tag <body>
ho creato dei psudo tasti "on" e "off":
<a href="#" title="On" style="text-decoration: none;" onClick="PlaySound('sound1')">On</a>
<a href="#" title="Off" style="text-decoration: none;" onClick="StopSound('sound1')">Off</a>
ed infine ho inserito questa stringa:
<embed src="musica.mp3" autostart="true" width="0" height="0" name="sound1" loop="true" enablejavascript="true">
Ho notato delle anomalie con alcuni browser.
Domanda? Perchè funziona tutto con Explore mentre con Chrome no!