Window clearTimeout() Method

Last updated on April 21st, 2020 at 02:45 am

Reading Time: < 1 minute
<!DOCTYPE html>
<html>
<body>

<button onclick="GEMCODEFunction()">Try it</button>
<button onclick="GEMCODEStopFunction()">Stop it</button>

<script>
var myGemCode;

function GEMCODEFunction() {
  myVar = setTimeout(function(){ alert("GEMCODE"); }, 5000);
}

function GEMCODEStopFunction() {
  clearTimeout(myGemCode);
}
</script>

</body>
</html>
Spread the Code

GEM

Author

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *