Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I generate the list? Need some help on the program. In HTML and JavaScript please create the following. Create two buttons. Create an

How do I generate the list? Need some help on the program.

In HTML and JavaScript please create the following.

  1. Create two buttons.
  2. Create an output division with an empty ordered list inside the division.
  3. Is linked to an external JavaScript file. The JavaScript should:
    • Respond to the click event of the first button. When the button is clicked a function should:
      • Create an array of at least 5 items
      • Use a loop to iterate through each item. The loop should use DOM methods to generate and add a list item to the (previously) empty ordered list inside the output division.
    • Respond to the click event of the second button. When the button is clicked a function should:
      • Create either a JavaScript object or JSON object in order to store data. The data should have at least three properties and associated values.
      • Use DOM methods to generate and add a paragraph to the end of the output division. The paragraph should print out each value of the defined properties for the object.

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions