Monday, May 14, 2012

setInterval(funtion(),time) change time on runtime

i want to change setInterval funtion time when my code is running.



i try this



<script type="text/javascript">
$(function () {
var timer;
function come() { alert("here"); }
timer = setInterval(come, 0);
clearInterval(timer);
timer = setInterval(come, 10000);
});
</script>


first SetInterval not work!!





No comments:

Post a Comment