Search

Monday, April 6, 2015
0 comments

Example of Count Down timer in Java Script

6:03 AMMonday, April 6, 2015
<!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
Protected by Copyscape Online Copyright Protection Software

0 comments :

Post a Comment

 
Toggle Footer
Top