HTML and CSS Reference
In-Depth Information
Figure 14-70
sasr statistics table
Walter has stored statistics about quarterbacks, running backs, wide receivers, kick
returners, and punt returners in a set of multidimensional arrays. He also has created
design styles for the stats table that he wants to appear on his Web page. Your job will be
to write the code that generates the node tree for the Web table, and to provide com-
mands to sort the contents of that table when a user clicks one of the table heading cells.
Walter wants the table to be sorted by default in descending order, but users should be
able to change the sort direction by clicking the same column heading twice in suc-
cession. Walter also has provided buttons to allow users to switch from one category of
player to another.
Complete the following:
1. Using your text editor, open the nfltxt.htm and tabletxt.js files from the tutorial.14\
case3 folder. Enter your name and the date in the comment section of each file, and
then save them as nflstats.htm and table.js , respectively.
2. Take some time to view the contents of the nflstats.htm , table.js , and stats.js files,
noting the structure of the HTML document and the global variables and functions in
the two JavaScript files.
3. Return to the nflstats.htm file in your text editor, and then add a link element to
connect the file to the table.css style sheet file. Add script elements to connect to
the stats.js file followed by the table.js file. Save your changes to the file.
 
Search WWH ::




Custom Search