Question
Document code with descriptive comments. **HTML FILE ** **JS FILE ***** /* uses the getEvent() function to return the HTML code contain in the daily
Document code with descriptive comments.
**HTML FILE **
**JS FILE *****
/*
uses the getEvent() function to return the
HTML code contain in the daily events
*/
function getEvent(day) {
var eventHTML;
switch (day) {
case 0: // Sunday Events
eventHTML = "
- \
- H..n \
A..n
\LXn: Room A414
\TiX: 12 am – 4 pm
\CXt: free
\ \ - B..a \
R...m
\LXon: F..e
\TXe: 7 pm &ndash 10 pm
\CXt: $..s
\ \
break;
case 1: // M..s
eventHTML = "
- \
- M..s \
P..s
\LXn: U..m
\Te: 7 pm – 11 pm
\Ct: xx
\ \ - D.. Series \
C c E g s...y
\Lon: u r
\Time: 7 9
\Cost: ..d
\ \
break;
case 2: // Tuesday Events
eventHTML = "
- \
- a s \
Make .. yours.
\L n: Ul
\T e: 9 am – 5 pm
\C t: free
\ \ - S s \
Former ..am, \
.., Jr.
\Location: Room 178
\Time: 7 pm – 8:30 pm
\Cost: free
\ \
break;
case 3: // W..s
eventHTML = "
- \
- Volunteer Fair \
Over .., etc.
\Location: Union Great Hall
\Time: 9 am – 5 pm
\Cost: free
\ \ - U e \
V.. e.
\L n: Room 125
\T e: 5 pm – 6:30 pm
\C t: free
\ \ - I..a \
Close-Up (Iran)
\L n: Oakside Theater
\T e: 7 pm – 9 pm
\C t: free
\ \
break;
case 4: // Thursday Events
eventHTML = "
- \
- Thursday e \
New .. your slot.
\L n: Union Circle
\T e: 8 pm – 11:30 pm
\Cost: free
\ \ - Midnight Cinema \
Amerika From ...
\L n: F..e
\T e: 10 pm – 11:30 pm
\C t: free
\ \ - Late Night Yoga \
Sample Union.
\
\Location: Rm B201 Time: 6 pm – 7:15 pm
\Cost: free .. session)
\ \
break;
case 5: // Friday Events
eventHTML = "
- \
- C r \
Meet .. interests.
\Location: Room A210
\Time: 11:30 am – 1 pm
\Cost: free
\ \ - Behind the Beat \
Clyde .. blues.
\Location: Great Hall
\Time: 7 pm – 10 pm
\Cost: free
\ \ - F s \
Me
\Location: F Circle
\Time: 7 ..t
\Cost: $5.50
\ \
break;
case 6: // sat
eventHTML = "
- \
- Kites on the Concourse \
Enjoy .. invention.
\Location: Uni..e
\Time: 10 am – 3 pm
\Cost: free
\ \ - Saturday .. s \
Play .. night.
\Location: Union Game Room
\Time: 7 pm – 11:30 pm
\Cost: $4.25 with student ID
\ \ - Great Hall Music Ball \
Ian ock.
\Location: Great Hall
\Time: 8 pm – midnight
\Cost: ID
\ \
break;
}
return eventHTML
}
Linking JS File Go to the bc_union.html file. Directly above the closingdate
where date is the value of the dateString variable Create the thisDay variable containing the day of the week number from the thisDate variable (Hint: Use the getDav method.) Function Call Using the thisDay variable as the parameter value, call the getEventO function to get the HTML code of that day's events and store that value in a variable named eventHTML Page Elements Applying the value of the dateHTML plus the eventHTM variables before the end of the element contents. method to the page element with the ID "unionToday, insert theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started