Answer: The
clearInterval() static method of window class is used to stop timer of the function specified in the
setInterval() method.
For Example:-
<script type="text/javascript">
var str = setInterval(function(){start_timer()},3000);
function start_timer()
{
alert("Hello");
}
function stop_timer()
{
window.clearInterval(str);
}
</script>
Asked In: Many Interviews |
Alert Moderator