Version compl�te: jsB@nk » Divers » À 1
URL: https://www.javascriptbank.com/down-to-1.html
Le JavaScript passe par une série de chiffres dans la case de saisie en vue de réduire progressivement le nombre à 1.
Version compl�te: jsB@nk » Divers » À 1
URL: https://www.javascriptbank.com/down-to-1.html
<style type="text/css">td{font-family:verdana,arial,helvetica; font-size:10pt; color:#000000}a{font-family:verdana,arial,helvetica; font-size:10pt; color:#003399; font-weight:normal}a:hover{font-family:verdana,arial,helvetica; font-size:10pt; color:#0066CC; font-weight:normal}</style><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<script language="JavaScript">/*Down To 1 JavaScript,By Premshree Pillai*/var delay = 1000;function down(num) {if(num % 2 == 0)num /= 2;elsenum = num * 3 + 1;document.numForm.numVal.value = num;if(num > 1)setTimeout("down('"+num+"')",delay);}function changeDelay(num) {delay += num;if(delay < 0) delay = 0;}function checkString() {var loc=document.location.href.split("?");if(loc.length>1) {URI=loc[1].split("=");if(URI.length>1) {var retURI="";for(var i=1; i<URI.length; i++) retURI+=URI[i];down(retURI,delay);}}}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<body onLoad="checkString()"><form name="numForm"><input type="text" name="numVal"><input type="submit" value="Click!"><input type="button" value="Reset" onClick="location.href='down1.htm'"><input type="button" value="<<" onClick="changeDelay(100)" title="Decrease Speed"><input type="button" value=">>" onClick="changeDelay(-100)" title="Increase Speed"></form></body><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->