vorrei creare uno script che attiva un file mp3 ad orario io ho fatto questo che ne pensate?(ho un orologio in php se serve ditemelo che metto il codice)
Codice HTML:<script eype=text/javascript language=javascript> var ora = data.getHours(); var min = data.getMinutes(); var sec = data.getSeconds(); if(ora=00){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=01){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=02){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=03){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=04){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=05){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=06){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=07){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=08){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=09){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=10){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=11){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=12){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=13){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=14){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=15){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=16){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=17){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=18){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=19){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=20){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=21){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=22){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=23){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} if(ora=24){ ora= "0"+ora;} if(min=00){ min= "0"+min;} if(sec=00){ sec= "0"+sec;} {<embed src="dialga.mp3" autostart="true" loop="1" hidden="true"> </embed>} </script>