0
How to stop click event after perticular number of clicks?
As given example executes number of times(number of clicks)..so what to do if i wanna stop click event after 5 clicks.so that it can stop executing and final answer shows the 5th click generated answer.
1 Odpowiedź
+ 13
var clicks = 0;
function buttonClick() {
clicks++;
if (clicks <=5) {
// Your Code
}
}