Register for your free account! | Forgot your password?

Go Back   elitepvpers Coders Den Web Development
You last visited: Today at 10:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Downcounter

Discussion on Downcounter within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
.Panda''s Avatar
 
elite*gold: 101
Join Date: Dec 2011
Posts: 2,183
Received Thanks: 1,146
Downcounter

Hey,
wie mach ich so ein Counter der runterzählt?
.Panda' is offline  
Old   #2
dotCom
 
Devsome's Avatar
 
elite*gold: 10414
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 17,083
Received Thanks: 4,760
Mit der function würde ich eine zeit generieren lassen (1-3 sekunden)
Mit würde ich dann runterzählen
Devsome is offline  
Old   #3
 
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 178
Code:
	
<script type="text/javascript">
/*<![CDATA[*/
var start_count = 360;
	
function countChange() {
var a = Math.floor(Math.random() * 5);
if (a == 1) {
document.getElementById("count").innerHTML = start_count--;
}
setTimeout("countChange()", 500)
} /*]]>*/
</script>
qqdev is offline  
Thanks
1 User
Old   #4
 
.Panda''s Avatar
 
elite*gold: 101
Join Date: Dec 2011
Posts: 2,183
Received Thanks: 1,146
Ok, der Counter funktioniert jetzt, wie kann ich das einstellen das er bei 0 aufhört zu zählen?
.Panda' is offline  
Old   #5

 
adistoe's Avatar
 
elite*gold: 63
Join Date: Oct 2012
Posts: 1,181
Received Thanks: 139
Braucht nur zwei Zeilen mehr...

Code:
if (start_count > 0){
setTimeout("countChange()", 500)
}
adistoe is offline  
Thanks
1 User
Reply




All times are GMT +2. The time now is 10:30.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.