rtkwar Posted November 27, 2011 Share Posted November 27, 2011 hi iam make game like travian and tribalwars if you want build soldiers you must wait 5:09:59 how ican make countdown for this! Link to comment https://forums.phpfreaks.com/topic/251911-javascript-countdown/ Share on other sites More sharing options...
Adam Posted November 27, 2011 Share Posted November 27, 2011 http://lmgtfy.com/?q=javascript+countdown Link to comment https://forums.phpfreaks.com/topic/251911-javascript-countdown/#findComment-1291674 Share on other sites More sharing options...
ManiacDan Posted November 28, 2011 Share Posted November 28, 2011 also note that a javascript countdown won't work for you, you also need to check the elapsed time in PHP. Link to comment https://forums.phpfreaks.com/topic/251911-javascript-countdown/#findComment-1291683 Share on other sites More sharing options...
rtkwar Posted November 28, 2011 Author Share Posted November 28, 2011 yes ivisit google before but iwant put all information inside function: example: <script type="text/javascript"> function timer(date){ dat=document.getElementById("date"); var time=dat.split(":"); if(time[0]>0){ time[0]=time[0]-1; t=settimeout("timer('date')",1000); document.getElementById("date").innerHTML=time[0]; }else{} } </script> <b id=test>5:09:59</b> timer('test') any one can give me code? Link to comment https://forums.phpfreaks.com/topic/251911-javascript-countdown/#findComment-1291772 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.