Answered step by step
Verified Expert Solution
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
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
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