I am using javascript setInterval method to run a repeatetive script .But I want to stop the interval when click on button.How can I do this?
function myFunction() { //run your code here } myFunction();
Here we are setting the interval.
var timer = setInterval(myFunction, 1000); // later on...
Here we are clear the interval.
clearInterval(timer);
Username
Password
Remember Me
Lost your password?
Username or E-mail:
Log in