function changeImage() { document.getElementById("imgRandom").src = document.getElementById("imgRandom").src + "?random=" + Math.floor(Math.random() * 1000 + 1); }