-->

Monday, April 6, 2015

Example of Count Down timer in Java Script

Example of Count Down timer in Java Script

<!DOCTYPE html>

<html>
<head>
    <title>encode and decode</title>
    <script type="text/javascript" >
        function Timercount(second,outwin) {
         
            var stat = document.getElementById(outwin);
            stat.innerHTML = "Please wait for " + second + "seconds";
            if (second < 1) {
                clearTimeout(timervalue);
                stat.innerHTML = '<h3> CountDown Complete</h3>';
            }
            second--;
            var timervalue = setTimeout('Timercount(' + second + ',"' + outwin + '")', 1000);

        }
     
    </script>
</head>
<body>
<div id="first"></div>
<script type="text/javascript">Timercount(10,"first");
</script>

</body>
</html>

Code Generate the following output

Example of Count Down timer in Java Script
Example of Count Down timer in Java Script

Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved