GEM-I'm a dedicated Wordpress & Squarespace developer

Window clearTimeout() Method

<!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

GEM

You may also like...

Leave a Reply

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