Multiple buttons

This program shows how to change an HTML image using multiple HTML buttons.

Programming Issues

The JavaScript code in this example is identical to our basic forms 5 example. The only difference is that it is the HTML buttons which call the changeImage(n) function through the onclick event.

Demonstration

[image]

Source and Downloads