I\'m trying to pause and then play a setInterval loop.
setInterval
After I have stopped the loop, the \"start\" button in my attempt doesn\'t seem to work :
add is a local variable not a global variable try this
var add; var input = document.getElementById("input"); function start() { add = setInterval("input.value++", 1000); } start();