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 or will load a Web page that explains that JavaScript is required to interact with the site.