How to disable a button if the button is clicked 10 times in less than 2 minutes.
But if the button is clicked 10 times in more than 2 min i what the counter to continue to count , i want to disable the button only if it is is clicked 10 times in less than 2 minutes . HOW CAN I DO THAT USING JAVASCRIPT CSS HTML . ? thank you.
Can you show me a demo or an example script. Thank you!
HERE A CODE .
<button id="BUTTON" ></button>
document.getElementById('button').onclick = function() { buttonClicked(); myFunction() }
var myVar;
function myFunction() { myVar= window.setInterval(120000); }
function buttonClicked() { if (totalCount + accCounter> 9) { document.getElementById("clap").disabled = true; } }