Count Down (Penghitung Mundur) dengan Redirect (Pengalihan) URL


Contoh kode JQUERY Redirect Url / Pengalihan url dengan penghitung mundur :

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>val demo</title>
<style type="text/css">
    body{ font-family: verdana; font-size:12px; }
    a{text-decoration: none;color:blue;font-weight: bold;}
    a:hover{color: gray;font-weight: bold;}
    div#my-timer{width: 400px;background: lightblue; margin:  0 auto;text-align: center;padding:5px 0px 5px 0px;}
</style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>

<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
    <script type="text/javascript">
        var settimmer = 0;
        $(function(){
                window.setInterval(function() {
                    var timeCounter = $("b[id=show-time]").html();
                    var updateTime = eval(timeCounter)- eval(1);
                    $("b[id=show-time]").html(updateTime);

                    if(updateTime == 0){
                        window.location = ("http://www.trikalfanetcell.com/");
                    }
                }, 1000);

        });
    </script>
<div id="my-timer">
        Page Will Redirect with in <b id="show-time">15</b> seconds       
</div>
</body>
</html>


Selamat mencoba....!
Previous
Next Post »