HTML and CSS Reference
In-Depth Information
3. Create a Web page that will prompt the user for a name, and age, and write the
message using the name and age in the message. Use the prompt() method and
variables to accomplish this.
4. Create a Web page that will prompt the user for a color name. Use this color name
to write the text “This is your favorite color!”. The fgColor property of the docu-
ment changes the text color of all text in a document. Use this property to accom-
plish this task.
5. Extend Hands-On Practice 14.8. Add a text box for the user's city. Ensure that this
text box is not empty when the form is submitted. If the city text box is empty, pop
up an appropriate alert message and do not submit the form. If the city text box is
not empty, and other data is valid, submit the form.
Web Research
1. Use the resources listed in the chapter as a starting point, but also search the Web
for additional resources on JavaScript. Create a Web page that lists at least five use-
ful resources along with a brief description of each. Organize your Web page with a
table that provides the name of the site, the URL, a brief description of what is
offered, and a recommended page (such as a tutorial, free script, and so on) for
each resource. Place your name in an e-mail link on the Web page. Print both the
source code (from Notepad) and the browser view of the Web page.
2. Use the resources listed in the chapter as a starting point, but also search the Web
for additional resources on JavaScript. Find either a tutorial or free download that
uses JavaScript. Create a Web page that uses the code or download that you found.
Describe the effect and list the URL of the resource on the Web page. Place your
name in an e-mail link on the Web page. Print both the source code (from Notepad)
and the browser view of the page.
WEB SITE CASE STUDY:
Adding JavaScript
Each of the following case studies has continued throughout most of the text. This
chapter adds JavaScript to selected Web pages from each of the case studies.
JavaJam Coffee House
See Chapter 2 for an introduction to the JavaJam Coffee House Case Study. Figure 2.26
shows a site map for the JavaJam Web site. The pages were created in earlier chapters.
Use the Web pages indicated in this exercise from the Chapter 9 javajamcss folder. You
have two tasks:
1. Add the date that the document was last modified to the bottom of the
music.html page.
2. Add an alert message to the music.html page. The alert message will indicate
“Concerts sell out quickly so act fast!”.
 
Search WWH ::




Custom Search