// this is all i have
function myFunction() {
var index = document.getElementById('concier').style.zIndex = 0;
var foto = document.getElementById('foto').src = "queen2.png";
return index + foto;
}
// i want this when te button is pressed again
var index2 = document.getElementById('concier').style.zIndex = -1;
var foto2 = document.getElementById('foto').src = "queen.png";
return index2 + foto2;
What I want is to press the button and change an image of a div but when I press the button again, go back to the original image. I am using HTML and Javascript.