On form objects, you can change the onClick property. In this example, we have a small form with just a button. Each time the button is pressed, it does something different. The JavaScript code for this demonstrates using variables to keep track of information between events and does several things with changing CSS properties on the page.