Sublime Text
<!DOCTYPE html> <html> <body> <button type="button" onclick="rePlay()">Click here</button> <p id="demo"></p> <script> var x = 1; function rePlay(){ document.getElementById("demo").innerHTML = x++; setTimeout(rePlay, 1000); } </script> </body> </html>
<!DOCTYPE html> <html> <body> <button type="button" onclick="rePlay()">Click here</button> <p id="demo"></p> <script> var x = 1; function rePlay(){ document.getElementById("demo").innerHTML = x++; setTimeout(rePlay, 1000); } </script> </body> </html>