Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The HTML page displays a list of possible prizes and possible winners, then uses random numbers to determine which one is the prize and who

image text in transcribedimage text in transcribed

The HTML page displays a list of possible prizes and possible winners, then uses random numbers to determine which one is the prize and who is the winner. Using JavaScript to create the lists and display the results.

Note that the unordered lists for the possible winners and possible prizes are empty, no list items. Those will be added using JavaScript to insert that content.

In the JavaScript, create 2 arrays -- one with a list of 10 people, one with a list of 5 prizes. NOTE: Your name must be in the list of people. Using loops, go through each array, add list item coding (

  • ...
  • ) and the array element to a variable. There are IDs associated with both lists in the HTML -- use those IDs to select the DOM element and insert the content.

    Next, create 2 random numbers, one to select an element in the array of people as the winner, and one to select an element in the array of prizes. Insert these array elements into the paragraphs for the winners.

    Make the web page better looking than black text on white background in Times New Roman. You may include an external style sheet, or embed a style sheet in the HTML document. There must be at least 3 text colors, a background color, and a change of font family. You don't have to match the style shown in the example.

    Lucky Winners! Here is the list of possible winners: Ann Martin Bob Daniels Carl Johnson David Gray Emily Smith Frank Newcombe Gary Borders Helen Garrison Isabel Adams Student Name One of those people will win one of these prizes: a $100 gift certificate a $50 gift certificate a winter scarf a pair of fun sunglasses a candy bar The Winner Is Student Name Student Name receives a $50 gift certificate Lucky Winners!

    Here is the list of possible winners:

      One of those people will win one of these prizes:

        The Winner Is

      Step by Step Solution

      There are 3 Steps involved in it

      Step: 1

      blur-text-image

      Get Instant Access to Expert-Tailored Solutions

      See step-by-step solutions with expert insights and AI powered tools for academic success

      Step: 2

      blur-text-image

      Step: 3

      blur-text-image

      Ace Your Homework with AI

      Get the answers you need in no time with our AI-driven, step-by-step assistance

      Get Started

      Recommended Textbook for

      The Database Experts Guide To Database 2

      Authors: Bruce L. Larson

      1st Edition

      0070232679, 978-0070232679

      More Books

      Students also viewed these Databases questions

      Question

      Question Can employees make contributions to a profit sharing plan?

      Answered: 1 week ago