News

onClick="testResults(this.form)" is an event handler. It tells the browser to invoke the given JavaScript function when the button is clicked, then pass in an object representing the form.
Since a user cannot click a button that does not appear within the page, developers need to use JavaScript functions to prompt whatever action the button would normally initiate on user clicks.