Version compl�te: jsB@nk » Form » Button » Transformez vos boutons en forme d'horloges temps réel
URL: https://www.javascriptbank.com/transform-your-form-buttons-into-realtime-clocks.html
Connaissez-vous la grande dynamique de votre capacité forme des boutons ? Bientôt vous! Test de cette JavaScript
Version compl�te: jsB@nk » Form » Button » Transformez vos boutons en forme d'horloges temps réel
URL: https://www.javascriptbank.com/transform-your-form-buttons-into-realtime-clocks.html
<SCRIPT language=javaScript><!-- Beginning of JavaScript -var showtime=truevar timervar i_sec=0function clockon() { if (i_sec < 5) { thistime= new Date() var hours=thistime.getHours() var minutes=thistime.getMinutes() var seconds=thistime.getSeconds() if (eval(hours) <10) {hours="0"+hours} if (eval(minutes) < 10) {minutes="0"+minutes} if (seconds < 10) {seconds="0"+seconds} thistime = "----- "+hours+":"+minutes+":"+seconds+" -----" document.forms[0].elements[0].value=thistime i_sec++ timer=setTimeout("clockon()",1000) } else { clearTimeout(timer) i_sec=0 document.forms[0].elements[0].value="Tell me the time" }}function clockoff() {clearTimeout(timer) document.forms[0].elements[0].value="Tell me the time"}// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<FORM><TABLE cellPadding=7 width=580> <TBODY> <TR> <TD align=middle><BR><BR><INPUT onclick=clockon() onmouseout=clockoff() onmouseover=clockon() type=button value="Tell me the time"> </TD></TR> <TR> <TD align=middle></TD></TR></TBODY></TABLE></FORM><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->