Here is the button to modify with a javascript action:
As in the previous example, the button element is given a unique id
attribute; a script uses the Document Object Model (DOM) to find the button element by its id and add the onclick handler. The action
attribute of the enclosing form
element contains a script that will perform the action on the server.