Sunday, 15 April 2012

javascript - setInterval skipping count -


I am writing a script to solve a 10 digit code and there is a script in it:

  var currNum = 9999999999; SetInterval (function () {var tmp = currNum; $ ('# code box-10') Val (Math.floor (tmp 10%)); tmp = tmp / 10; $ ('# code box-9') .val (Math.floor (tmp 10%); tmp = tmp / 10; $ ('# code box-8') Val (Math.floor (tmp 10%.)); Tmp = tmp / 10; $ ( '# Code box-7') Val (Math.floor (tmp 10%)); tmp = tmp / 10 ;. $ ('# code box-6') Val (Math.floor (tmp 10%)); Tmp = tmp / 10; $ ('# code box-5') Val (Math.floor (tmp 10%)); tmp = tmp / 10; $ ('# code box-4') .val (Math. Floor (tmp 10%); tmp = tmp / 10; $ ('# code box -3') Val (Math.floor (tmp 10%.)); Tmp = tmp / 10; $ ('# code-box 2 '). Val (Math.floor (TMP% 10)); TMP = TMP / 10; $ (' # code-box-1 ') Val (Math.floor (TMP)% 10 )); $ ("# Btn-submit") Trigger ("click"); CurrNum--;}, 1000);  

The script just refreshes every page, but updates the numbers in the multiples of 5 and does it once every 5 seconds. For example:

Call 1: 9999999999 Call 2: 9999999999 Call 3: 9999999999 Call 4: 9999999999 Call 5: + 999999999 5 Call 6: + 999999999 5 Call 7: + 999999999 5 Call 8: + 999999999 5 Call 9: + 999999999 5 Call 10: + 999999999 0 Call 11: 99 99 99 99 99 99 and so on

I know that this is not one of the most skilled people, but any thoughts on such behavior?


No comments:

Post a Comment