variante con suono ad ogni cambio anno
nell'esempio l'anno cambia ad ogni minuto (cambia la variabile minutes_for_year)
copia il codice e metti nella stessa path il file wav (che ho trovato qui
http://www.ibiblio.org/pub/multimedi...ounds/ding.wav)
P.s. Funziona solo con IE e Firefox... bisogna modificarlo per opera
Ciaocodice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>xhtml 1.0</title> <style type="text/css"> /* <![CDATA[ */ #objwav { height : 0; width : 0; visibility : hidden; } /* ]]> */ </style> <script type="text/javascript"> var minutes_for_year = 1; // sostituisci qui ad es. 10 function countYear(currentYear) { wait = minutes_for_year * 60 * 1000; currentYear = currentYear || 1500; document.getElementById('objwav').play(); document.getElementById('yearcounter').innerHTML = currentYear; setTimeout("countYear(" + (++currentYear) + ")", wait) ; } window.onload = function() { countYear(); } </script> <body> <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="objwav"> <param name="autostart" value="0" /> <param name="filename" value="ding.wav" /> </object> <div id="yearcounter"></div> </body> </html>
-Fab-

Rispondi quotando