Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fruits Fruit Price Apple Watermelon $1.79 . $3.39 . $2.05 Rotate Increment Write a complete webpage with HTML and JavaScript code. This page contains two

image text in transcribed

Fruits Fruit Price Apple Watermelon $1.79 . $3.39 . $2.05 Rotate Increment Write a complete webpage with HTML and JavaScript code. This page contains two unordered lists and two buttons, the Rotate button and the Increment button, as shown below. Follow the example at https://www.w3schools.com/jsref/event_onclick.asp, add an onclick event and an event handler to both buttons. Both event handlers are JavaScript functions The event handler of the Rotate button does following. After every click, all list items in both lists are rotated upward one place circularly. For example, the first item at the top is shifted to the bottom of the list. . There should be no limit to the number of clicks. Otherwise 10 points deduction will be . The getElementsByTagName) method must be used. Not using this method, 30 points The JavaScript code should adapt all possible list size without revising code. Note that using applied deduction will be applied a loop (better a for loop) is an effective approach to make JavaScript code scalable to list size. The getElementByldO method should NOT be used with list item, otherwise 10 points deduction will be applied e Duplicating the array generated from calling getElementsByTagName) method is NOT recommended and will result in 5 points deduction. The event handler of the Increment button does following. After every click, increment every item in the Fruit Price list by 10 cents. There should be no limit to the number of clicks. Otherwise 10 points deduction will be applied

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago