Unit 9 Arrays Assignment
Lookup Tax Rate Form
This form will use arrays to load the values into the drop down list. It will allow the user to select a state from the dropdown list. Once it is selected the tax rate for that state will be dislayed on the form.
- Create an array called states that lists the following states in this order: Iowa, Illinois, Missouri, Wisconsin
- Create a parallel array called stateSalesTax that lists the following values in this order: 6%,11%,7%,8%.
- Create a function called salesTaxLookup( ).
- Use the onchange event handler on the select element to run salesTaxLookup( )
- 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 stateSalesTax array.
- It will display the tax rate for the selected state.