New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
bartleby

Concept explainers

Question
Book Icon
Chapter 13, Problem 8CP2

a)

Program Plan Intro

To create a function named calcExp ()to calculate the total of the row and column from the travelExp tableand within this function, create a variable named expTable to reference all the element of the travelExp table in the dl_expenses.js file.

b)

Program Plan Intro

To create a loop that execute for each row of the table to call the calcClass () function with the parameter named dateindex to set the value of the input element with the ID named subtotalindex . The index is the counter value of for loop. Format the value using the formatNumber () function to the 2 decimals in the dl_expenses.js file.

c)

Program Plan Intro

To set the value of the input element named transTotal, lodgeTotal, mealTotal, and otherTotal by calling the function named calcClass()with the parameters named trans, lodge, meal, and other.Format the values using the formatNumber ()function to the 2 decimals in the dl_expenses.js file.

d)

Program Plan Intro

To set the value of the input element named expTotal by calling the function named calcClass () with the parameters named sum and format the values using the formatUSCurrency ()function to style the currency to the USD in the dl_expenses.js file.

Blurred answer
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning