HTML and CSS Reference
In-Depth Information
Tu Tori a l 11
Working with
Operators and
Expressions
Creating a New Year's Day
Countdown Clock
O b j e c t i v e s
Session 11.1
• Insert a value into a Web
form field
• Work with event handlers
• Create and work with Date
objects
• Extract information from Date
objects
Session 11.2
• Work with arithmetic and
unary operators
• Understand the properties and
methods of the Math object
• Control how JavaScript works
with numeric values
• Explore conditional,
comparison, and logical
operators
• Run time-delayed and timed-
interval commands
Case | Tulsa's New Year's Bash
Every year on December 31st, Tulsa, Oklahoma, rings in the New
Year with a daylong celebration. The New Year's Bash includes
races, circus performers, tasting booths, live bands, and dances, and
is capped by fireworks at midnight. The bash has become so big
that partygoers come from miles away to join in the fun, and plan-
ning for the celebration starts early.
Hector Sadler manages promotion for the New Year's Bash. One
of his responsibilities is to maintain a Web site that advertises the
event and builds anticipation for it. Hector wants to include a
countdown clock on the site's home page that displays the current
date and the number of days, hours, minutes, and seconds remain-
ing before the fireworks go off. You will write the JavaScript code to
create this clock for Hector.
STarTing DaTa FileS
tutorial.11
tutorial
review
case1
case2
clocktxt.htm
functxt.js
+ 1 graphic file
+ 1 style sheet
+ 1 JavaScript file
eventstxt.htm
datestxt.js
+ 1 graphic file
+ 1 style sheet
+ 1 JavaScript file
triviatxt.htm
+ 1 graphic file
+ 1 style sheet
+ 2 JavaScript files
calctxt.htm
+ 2 graphic files
+ 1 style sheet
+ 1 JavaScript file
case3
case4
guesstxt.htm
+ 4 graphic files
+ 1 style sheet
+ 1 JavaScript file
malltxt.htm
+ 4 graphic files
+ 1 text file
+ 2 JavaScript files
HTML 743
 
Search WWH ::




Custom Search