Question
Consider the following HTML document: Item Prices New Item price: This document displays 2 inputs mainly: a number field and a button . The utility
Consider the following HTML document:
This document displays 2 inputs mainly: a number field and a button.
The utility of this page is to.
You are asked to write a separate JavaScript file that uses array and function(s) to keep the new list of item's prices with the time when they added and display them as HTML table with statistics about them (average, min , max and the total) . Make sure your code adds only numbers to the list of prices and not to add the price twice. When the number is added, please consider adding the current time and then sort the array of prices. Suggestions: declare two arrays (one to keep prices and the other to keep times) as global variables and 3 functions: start (to add an event listener to the button), addPrice (that performs the comparison, statistics and update the array), and updatePrices (display the content of the array in the HTML table). | ||||||||||||
Question 2: |
| To be answered in (30) Minutes [ ] / 10 Marks |
Consider the following HTML document:
Student InformationFields marked with (*) are required.
|
|
|
| When the mouse moves over range showing year spent in university alert will show as the following:
|
When user click submit or reset
|
|
You are asked to write a separate JavaScript file that can handle the form as the following:
1. When the user finishes writing his full name, you should change the title (hint you could use document.title)
2. Once the date of birth is given, you should show the age.
3. When the mouse moves over range showing year spent in university alert shows: (choose how many years spent in university)
4. When the user clicks on submit or reset, Are you sure you want to submit/clear your information ?
5. You should set timer interval to calculate the time spent on the page, if its more than 30 second alert will be given.
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