Tuesday 15 April 2014

How to use ajax function in asp .net

<!-- Write your Script Function-->

<script type="text/javascript">
        var count = 0;
        function changeColor()
       {
         setInterval(starttimer, 200);
        }
        function starttimer() 
        {
            count += 1;
            var san = document.getElementById("divtxt");
            san.style.color = san.style.color == "red" ? "blue" : "red";
            document.getElementById("lbltxt").innerHTML = " Starts Your Time: " +count;
        }
</script>


<body>
<div id="divtxt">
<label id="lbltxt"style="font:bold 25px Arial" />
</div>
<button onclick="changeColor();"> Timer Counter Start</button>
</body>


No comments:

Post a Comment