Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

Item Prices

This document displays 2 inputs mainly: a number field and a button.

The utility of this page is to.

3

1

4

2

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 Info

Student Information

Fields marked with (*) are required.

(yyyy-mm-dd)

required /> (name@domain.com) /span>

min = "0"

max = "5"

step = "1"

value = "4" required />

(Enter Your GPA between 0 and 5)

3

min = "3"

max = "8"

value = "4" /> 8

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

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

More Books

Students also viewed these Databases questions