K, So I am trying to make my button change image on the website so if they click the button it changes to another image, here is my current JS and I have no clue to continue making it work.
Code:
var pics = [
".\bilder\bild-1.jpg",
".\bilder\bild-2.jpg", // Array
".\bilder\bild-3.jpg",
];
var btn = document.querySelector("Button"); // Selectar knappen
var image = document.querySelector("img"); // Selectar Bilden
var counter = 1; // Börjar räkningen på en
if (btn.onclick === true) {
}
3[DOUBLEPOST=1543317574][/DOUBLEPOST]
