Question 1 In this question, you continue to work on the pizza order form (e.g., Figure 1) you have created in previous assignments. This time, you are asked to create a drop-down list for the state, validate zip code, and print out formatted strings for name and city.
Make a copy of the file a6 code.html
Modify the HTML code of the pizza order form. Replace the textbox for ‘State’ with a drop-down list having predefined values. For exercise, you don’t need to list all the states. You can just use the following four states: “PA”, “NJ”, “NY”, “DE”. Please see the “State” field in Figure 1.
Update the doClear() function. When the “Clear Entries” is clicked, reset the “State” to be the default value which is “PA”.
Validate the zip code:
If the “Zip” is not empty, validate that the zip code has exactly 5 digits.
Provide an alert if the zip code is not in the correct format.
Print out the order information. When “Submit Order” is clicked, the entire order information is printed out. This time, the “State” is the value selected on the drop-down list. In addition, you are asked to print out the “Name” and “City” fields in the following format.
In particular, the individual words in the string of the “Name” and “City” must begin with an uppercase letter followed by all lowercase letters. For multiple words, each word begins with an uppercase letter followed by all lowercase letters.
For example, if a user types “peTer” in the name box, and “phiLaDelphia” in the city box, the output message should display them as:
If you need solutions to this assignment or any related to this or any project related help please visit or contact us so we can provide solutions to these types of projects.