Html Button Onclick Image Change. Setting an image. Change image when user cick on image.

There are no html forms in this example just an image. Assign the onclick event to the window object. If the user clicks in the window set the background color of body to yellow.
Assign the onclick event to the window object.
Below is example how to change image when user click on this image. Setting an image. Change image when user cick on image. The border of the button can also be removed to show only the image itself.