我想知道如何将图像更改为另一个图像,然后恢复正常,因为以下代码不起作用:
function change(){
img = document.getElementById("img")
img.src = "Login_img2.jpg"
img.onclick = "change2()"
}
function change2(){
img = document.getElementById("img")
img.src = "login_img3.jpg"
img.onclick = "changeN()"
}
function changeN(){
img = document.getElementById("img")
img.src = "login_img1.jpg"
img.onclick = "change()"
}