HTML and CSS Reference
In-Depth Information
Case Problem 4
Use your
knowledge of
arrays, loops,
and conditional
statements to
create a lunar
Data Files needed for this case Problem: astro.css, caltxt.css, lunartxt.htm, lunartxt.js,
modernizr-1.5.js, moonfunc.js, phase0.jpg-phase15.jpg, skyweb.png
SkyWeb Dr. Andrew Weiss of the SkyWeb astronomy Web site is working on a Web
page describing the phases and properties of the Moon. Dr. Weiss wants the page to
contain a table describing the current conditions of the Moon, including the Moon
phase, age (days since the last new Moon), distance from the Earth, and position in
the nighttime sky. He also wants the page to contain a lunar calendar for the current
month. A lunar calendar is a calendar that displays the phase of the Moon on each day
of the month. A preview of the page that Dr. Weiss wants you to create is shown in
Figure 12-39.
Figure 12-39
skyweb lunar calendar
Dr. Weiss has designed the basic layout for the page. He wants you to write scripts to
generate the lunar calendar as well as to insert data on the current lunar conditions in a
summary table located at the top of the page. To help you create this page, Dr. Weiss has
supplied a file named moonfunc.js containing the functions described in Figure 12-40.
Search WWH ::

Custom Search