Practice exercises CHAPTER 7 331
C. required
D. user name
- When you want to send form data to the server to update data in the database, which
HTTP method should you specify of the - If you want to add a slider control to a webpage, which element do you use?
A.
B.
C.
D.
Practice exercises
If you encounter a problem completing any of these exercises, the completed projects can be
installed from the Practice Exercises folder that is provided with the companion content.
Exercise 1: Create a Contact Us form
In this exercise, you apply your HTML5 form and form validation knowledge by creating a
Contact Us page for the calculator application in the previous chapter. The webpage will
prompt the user for first and last name, email address, and nature of the communications. All
the fields will be required.
- Start Visual Studio Express 2012 for Web. Click FILE and choose Open Project. Navigate
to the solution you created in Chapter 6, “Essential JavaScript and jQuery.” Select the
WebCalculator.sln file and click Open.
If you didn’t complete the exercises in Chapter 6, you can use the solution in the
Chapter 7 Exercise 1 Start folder. - In the Solution Explorer window, right-click the default.html file and choose Set As
Start Page. Press F5 to verify that your home page is displayed. - In the Solution Explorer window, copy the default.html page to a new HTML file by
right-clicking the default.html file and choosing Copy. Right-click the WebCalculator
project node and choose Paste.
This creates a file named Copy of default.html. - Right-click the new file and choose Rename.
- Name the new file ContactUs.html and press Enter.