I need the auto click to stop after 320 times.
How to do it?
var = "320";
// i need the loop to stop after 320 times.
var button = document.getElementById("jsonp2");
setInterval(function() {
button.click();
}, 10000);
<input type="button" id="jsonp2" href="javascript:void(0)" onclick="javascript:alert('button autoclicked');" class="btn refreshListButton" title="Refresh">