Reputation: 23
This is my code in the image below. I need someone to show my errors
Here is my code;
var input = document.getElementById('poll-answer-16');
set interval(function(){
button.click()
}, );
var input = document.getElementById('win');
set interval(function(){
button.click()
}, );
setInterval(function() {
window.location.reload();
}, 10000);
Upvotes: 1
Views: 43
Reputation: 54
Someone may correct me if I am wrong but your setInterval does not have any delay parameter.
also you set button.click() so looks like a function but it is not but there is not even listener attached to your input variable so the browser does not know when do executethe function
you should have something more like:
var input = document.getElementById(id);
input. addEventListener('click', () => {
//code to run
});
also you have set a variable in the same scope with the same name so the second variable will overwrite the first making it incomplete
I hoped this helped a bit would say more but I am not sure what you want it to do
Upvotes: 1