User:Aoziwe/sandbox/imageswap

<!DOCTYPE html>

JavaScript Can Change Images



Click the light bulb to turn on/off the light.

function changeImage { var image = document.getElementById('myImage'); if (image.src.match("bulbon")) { image.src = "pic_bulboff.gif"; } else { image.src = "pic_bulbon.gif"; } }