1. (50 point) The textarea shown to the left contains data on the top fifty junior bowlers in the USA in the Junior Bowler Tour (JBT). The DTD for the data is shown below.
<?xml version="1.0"?> <!DOCTYPE juniorbowlertour [ <!ELEMENT juniorbowlertour(bowler+)> <!ELEMENT bowler (rank,name,info)> <!ELEMENT rank (#PCDATA)> [50 → 1] <!ELEMENT name (#PCDATA)> [full name] <!ELEMENT info (#PCDATA)> [career history]When the "Execute p1" button is clicked, roll the XML data into a 50 row by 3 column table.
Begin your code assuming root has already been defined in your code. Count the total number of times the exact string "JBT" appears inside all of the info tags. Place the resulting table in the DIV with id="p1_out" and after the end of the table show the count of "JBT" string. Provide NO table heading row. Show only the javascript for p1. This is the DIV with id='p1_out'
|
|
2. (50 points) Create a display of a 5 row by 4 column key numeric pad layout with 18 keys. An HTML version of the key pad layout is shown to the left using an HTML table. You are to make another version using 18 DIV blocks to create the faces of the keys. Assume each DIV begins like this: div_start_value="<div style='outset black 2px;margin:0px;font-size:13px;position:absolute;text-align:center;background-color:rgb(127,127,127);color:white;width:40px;"; The array button_text shown below contains the 20 string elements that specify the text to appear on the button faces in the twenty possible key positions (Note: ↑, ↓, ←, and → are the up, down, left and right arrow characters: ↑, ↓, ←, →). var button_text=["Num,Lock" , "/" , "*" , "-" , "7,Home" , "8,↑" , "9,PgUp" , "+" , "4,&larr;" , "5" , "6→" , "" , "1,End" , "2,↓" , "3,PgDn" , "Enter" , "0,Ins" , " " , ".,Del" , "" ];
| ||||||||||||||||||||
this is div with id="p2_out" | |||||||||||||||||||||