Forms can be used with JavaScript to ease Web site navigation. The user selects a location from a drop-down box and clicks the "Go!" button to jump to the desired location. The 'Go!' button runs a function that is coded in the head of the Web page.
Here's an example of JavaScript/ form navigation:
When using JavaScript code with forms, make sure to name the form. As always, forms should start with the </p> <form> tag and end with the </form> tag. The method and action attributes are not required for this assignment. In this example, the button will call a function, which runs JavaScript code. Make sure to include all your HTML controls between the form tags!
<form name="pageform">Here's the code for the form controls (place the code between your form tags):
Drop-Down Box< input name="gobutton" type="button" value="Go!" onClick="jumper(window.document.pageform.pageselect.value)">
Here's the code used to create the function in the head section of the Web page: