WDV221 Intro Javascript
Project 6 Arrays
Lookup Tax Rate Form
This form will allow the user to select a state from a dropdown list. Once it is selected the tax rate for that state will be dislayed on the form.
Instructions:
- Use javascript to create the options in the drop down menu. Put the state name as in the drop down.
- The option elements will look like this <option>Iowa</option>
- Use the onchange event handler on the select element to run displayTaxRate( )
- Create a function called displayTaxRate( )
- The function will use a lookup loop to find where the state is located in the states array. It can then get the corresponding tax rate from the taxRate array.
- It will display the tax rate for the selected state.