hi,
I was looking for a scrip ich could implement to trigger a button automatically every 3 seconds.
I found this on stack overflow: javascript - script - click button every x seconds - Stack Overflow
<input type="submit" name="Submit" id="but" value="Puxar Alavanca">
var but = document.querySelector("[name='Submit']");
setInterval(function () {but.click();},3000);
But I can’t make it work. How do I give my button the id “but” like in the example?
Can anybody help?