Jump to content

Count Up Script ?


CaTaLinU

Recommended Posts

You would need javascript for that.

 

<script type="text/javascript">
function timeMsg()
{
    var t=setTimeout("alertMsg()",3000); // 3000 microsecond = 3 seconds.
}
function alertMsg()
{
    alert("Hello"); // after 3 seconds, this alert dialog will be displayed.  You could get rid of this, and have the script do whatever you need it to do.
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/246352-count-up-script/#findComment-1265084
Share on other sites

<html>
<head>
<script type="text/javascript">
var c = 0;
var t;
var timer_is_on = 0;

function timed_count() {
document.getElementById('counter').innerHTML = c;
c = c+1;
t = setTimeout('timed_count()',1000);
}

function do_timer() {
if(!timer_is_on) {
  timer_is_on = 1;
  timed_count();
}
}
window.onload = do_timer;
</script>
</head>
<body>
<div id="counter">0</div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/246352-count-up-script/#findComment-1266445
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.