JavaScript Student Workbook.pdf
JavaScript Student Workbook.pdf
Fill-in-the-Blanks Domain 1
Instructions: While watching Domain 1, fill in the missing words according to the information presented
by the instructor.
[References are found in the brackets.]
1. JavaScript has a sign which means, is this equal to this value? [Assignment]
4. When using JavaScript, your work after every one or two changes. [Subtraction]
5. When working with division in JavaScript, the remainder is otherwise known as the . [Division]
6. In JavaScript the method to control the number after the decimal point is. [Multiplication]
8. Compound assignment operators add, subtract, multiply, divide, and values at the same time.
[Compound Assignment Operators]
in progress. [Debugger
15. You can use the debugger keyword to stop the Keyword]
16. Breakpoints allow you to code, check on variables, and then run code step by step to continue
processing it. [Set Breakpoints]
17. You will often have as a debugging tool a console in which you can enter to get information.
[Console.log]
18. Like style sheets, are better managed when they are external. [When to Use]
20. Anything used on an style sheet should not be repeated inline. [Use Both Scripts]
Exception Handling
21. One unique aspect of JavaScript is messages do not typically pop up in a web
that they occur. [Try and Catch] browser when
22. A finally block will run no matter which part, or , runs. [Finally]
Browser Object Model Interaction
23. With HTML, CSS, and JavaScript, applications are built with many
opportunities for . [Manage
State]
24. Alerts are basically displayers and have an OK button. [Display Dialogs]
25. is a browser object and width and height are two of its properties.
[Determine Screen Size]
Operators Estimated
One of the most important aspects to understand about JavaScript is Completion Time:
minutes
the proper use of operators. The first two projects in this workbook will
cover some of these operators in detail. The first three operators you
will work with are the assignment, increment, and decrement operators. Video Reference:
Increment operators tell a variable to increase by one and decrement Domain 1
operators tell a variable to decrease by one. Topic: Assignment and
Arithmetic
Operators
Note: For all projects in this course, when you are asked to open a file,
Subtopics: Assignment;
assume you need to open it in your code editor unless you see a Increment and Decrement
different specification, like opening the file in your web browser.
Objectives Covered:
Purpose: 1 JavaScript Operators,
After completing this project, you will know how to use assignment, Methods, and
increment, and decrement operators. Keywords
1.1 Complete and debug
code that uses assignment
Steps for Completion: and arithmetic operators
1. Open the 11a-cartassignments.htm file from the Music1 Student 1.1.a 1.a Assignment
folder to your code editor. 1.1.b 1.b Increment
2. Find this comment: <!-- Add the three operators for the three input 1.1.c Decrement
buttons--> approximately 60 lines down in the document.
3. Find the three input buttons with IDs of manqtyadd, manqtysub, and manqty zero,
respectively.
4. On the line with the button with the ID of manqtyadd, add the increment operator to
the value property.
5. On the line with the button with the ID of manqtysub, add the decrement operator to
the value property.
JavaScript, like many other programming languages, uses the computer Project Files:
standard of a + for addition, a – for subtraction, a * for multiplication, 11d-cart-operators.htm
and a / for division. The key point of knowledge for the exam is to know
which operators to use given a situation or problem to solve. That is Estimated Completion
exactly what you will practice in this and the next project. Time:
minutes
Purpose:
After completing this project, you will be able to identify which Video Reference:
operators to use in a given situation. Domain 1
Topic: Assignment and Arithmetic
Steps for Completion: Operators
Subtopics: Addition;
1. Open the 11d-cart-operators.htm file from the Music1 Student
Subtraction; Multiplication
folder in a web browser.
2. Take note of what needs to be added to get to a subtotal and then
subtracted to get to a grand total. Objectives Covered:
1 JavaScript Operators, Methods,
3. Open the 11d-cart-operators.htm file from the Music1 Student and
folder in your code editor. Keywords
4. Find this comment: <!-- Add the addition and subtraction operators 1.1 Complete and debug code
that uses assignment and
in the correct places --> arithmetic operators
5. Add addition operators and subtraction operators in the correct 1.1.d Addition
places in the Update Cart button script to get the correct subtotal 1.1.e 1.e Subtraction
and grandtotal, ignoring the sales tax for now.
6. Save your changes.
7. Preview the webpage in a web browser. Project Details
8. Click the Update Cart button. You should see a total of 799.97.
Project Files:
Multiplication, Division, and 11f-soundproofing.htm
Project Files:
Operators 11i-cart-compound.htm
Project Files:
and Naming Conventions 12a-soundproofing.htm
Project Files:
Tags 12d-tuningkits.htm
Part of writing good code is knowing the tools you have to troubleshoot Project File:
code and using those tools well. JavaScript does not have as many 12g-cart-constants.htm
troubleshooting tools as do other languages, but, there are still a few
good ones you can use, mostly within a web browser. If your code editor Estimated Completion
has troubleshooting tools, you can use those as well. One common Time:
troubleshooting tool to use is the debugger keyword. This will make the minutes
code pause at that point and then, within a browser, you can use the
console within the browser to run tests on current variables and HTML
elements. Video Reference:
Domain 1
Topic: JavaScript Best Practices
Purpose: Subtopic: Debugger Keyword
After completing this project, you will have familiarity with the debugger
statement and know how to use it within a webpage.
Objectives Covered:
1 JavaScript Operators, Methods,
Steps for Completion: and
1. Open the 12g-cart-constants.htm file from the Music1 Student Keywords
folder. 1.2 Apply JavaScript
best practices
2. Scroll down about 175 lines to this code: // put the debugger here
2.g Debugger keyword
3. Replace the comment and code with the debugger keyword.
4. Save your changes.
5. Preview the webpage in a web browser.
16. Rerun the console.log statement you typed earlier. It should show a value of 809.97.
17. Close all your open webpages in your browser and files inside of your code editor.
Project Files:
External Scripts 13a-cart-compound.htm
main.js
When building scripts with JavaScript code (or any script for that
matter), one important decision to make is whether to put the script
Estimated Completion
inline, meaning inside of a file, or in an external file. You also, both for
the exam and beyond, will want to know the effects of having both
Time:
10-15 minutes
inline and external scripts, especially when the same variable name is
declared in both files.
Video Reference:
Domain 1
Purpose: Topic: Inline and External Scripts
After completing this project, you will have a better understanding of Subtopics: When to Use;
when to use scripts inline and when to use external scripts. You will also How to Use; Use Both Scripts
know how variables behave when they are declared in both inline and
external scripts.
Objectives Covered:
1 JavaScript Operators, Methods,
Steps for Completion: and
1. Open the 13a-cart-compound.htm file from the Music1 Student Keywords
folder in a web browser. 1.3 Evaluate the use of
internal and external scripts
2. View the HTML source of the file. Is the JavaScript code inline or in an external file? 3.a When to use
1.3.a
1.3.b 3.b How to use
3. Give two reasons in favor of using external scripts over inline scripts: 1.3.c What happens
when scripts are used at
4. Click the Update Cart button. The total amount should be 856.67. multiple levels
5. In your code editor, open the 13-cart-compound.htm file and the main.js files from your Music 1
Student folder.
6. Notice the salesTaxRate of .075 within the main.js file.
7. Return to the 13-cart-compound.htm file and scroll to the script tag at the bottom of the page.
8. Notice the salesTaxRate of .07. This is the rate used in the calculation to create a total amount of
856.67.
9. In the head section, add a tag that links the current page to the
main.js file in the scripts folder. Project Details
10. Save your changes.
11. Preview the webpage in a web browser. Project Files:
14a-practice.htm
12. Click the Update Cart button. What is the total amount?
Estimated Completion
13. What caused the amount to change?
Time:
Implementing Exception minutes
Video Reference:
Handling Domain 1
Topic: Exception Handling
Exceptions are errors that happen while code is running. Unless handled
Subtopic: Try and Catch; Finally
properly, exceptions will usually cause an app to crash. To handle these
exceptions more gracefully, code that could fail during runtime should
be implemented using a try/catch/finally block, to where the try block Objectives Covered:
contains the code one attempts to run, the catch block runs if the code 1 JavaScript Operators, Methods,
and
Keywords
1.4 Implement
11 | Domain 1 JavaScriptexception
Project Workbook
handling
1.4.a 4.a Try
1.4.b 4.b Catch
1.4.c Finally
in the try block causes an exception, and the finally block contains code that runs whether the try block
worked or did not work.
Purpose:
After completing this project, you will know how to use the try, catch, and finally keywords in JavaScript
code.
A state of a JavaScript object describes the current mode of an object. Project Files:
Windows can be open or closed. Objects can be made to be visible or 15a-cart-checkout.htm
invisible. Buttons can be enabled or disabled. For the exam, make sure
you understand the meaning of a state of an object. Estimated
In the upcoming project, you will get a small sample of managing Completion Time:
states. minutes
5. An undefined variable is one that has been , but has never had a value. [Undefined]
6. If you have a variable that is not acting the way you think it should, check out its . [Typeof Operator]
8. The keyword tells JavaScript this is a variable and not an object. [Use Strict]
9. In many cases, a data type has to be explicitly before it can be used. [Convert Between Data Types]
11. JavaScript has many different ways in which strings can be . [String Operations]
12. One area that JavaScript is not that picky about is in the use of marks. [Nesting Quotes]
13. If you know what a variable should when you declare it, initialize it. [Initialization]
16. Arrays that are coded but not filled in are considered . [Initialization]
17. The is a great way to experiment with array features. [Sorting and
Searching]
18. adds an item to an array while removes the last item from an array.
[Push and Pop]
19. Shift really is the opposite of , and unshift really is the opposite of
.
24. Having classes objects helps ensure consistency among objects. [Instantiation]
25. A date variable with no date specified will return the date. [Date Object and Time]
28. When we subtract two dates in JavaScript, the difference appears in . [Add and Subtract Dates]
30. The round method in JavaScript rounds a number to the nearest number. [Round]
31. The Math.abs method in JavaScript will make a number represent its value. [Abs]
32. The floor method takes the lower whole number of two numbers around a . [Floor and Ceiling]
33. The min and max functions retrieve minimum and maximum numbers from a of numbers. [Min and
Max]
34. The Math.pow method in JavaScript takes a number and it to the power specified. [Pow]
35. The Math.sqrt method takes a number and calculates its [Sqrt]
37. The best way to test variable scope is to use the . [Local vs. Global Scope]
38. are the type of variable that cannot be redefined. [Redefining Variables]
39. When declaring a variable for use as a parameter, for the variable must be specified.
the Parameters] [Passing
40. For objects, it is better to set each object to have its own . [Value vs. Reference]
41. If a result is saved for later use, the return keyword is used. [Return Values]
Project Files:
String Variables 21a-cart-variables.htm
The three variables you will declare in this project are number variables, string variables, which hold text,
and Boolean variables, which are set to either true or false.
Purpose:
After completing this project, you will know how to name variables
properly and you will know how to declare number, Boolean, and string
variables.
Video Reference:
In addition, you will sometimes want to declare variables using the var Domain 2
keyword. While this is not required, using var tells JavaScript that Topic: Primitive Data Types
indeed you are declaring a variable and not a new object. The less Subtopics: Null; Undefined
thinking JavaScript must do, the faster apps run.
Objectives Covered:
Purpose: 2 Variables, Data Types, and
After completing this project, you will be able to set a variable to null Functions
and set a variable to be undefined. 2.1 Declare and use variables
of primitive data types
2.1.d Null
Steps for Completion:
2.1.e 1.e Undefined
1. Open the 21d-cart-variables.htm file from the Music2 Student
folder in a web browser.
2. In the Mandolin field, click the + button to add one to the quantity.
3. Click the Clear button. Notice the quantity does not clear but changes to 0.
4. To start to fix the code, open the 21d-cart-variables.htm file in your code editor.
5. Scroll down about 65 to 70 lines to find this comment: <!--make the manqty field empty when the
Clear button is clicked-->
6. A few lines below the comment, for the button with the ID, manqtyzero, change the code so that the
manqty field becomes empty and not 0 when the button is clicked.
7. Scroll down to the bottom of the document.
8. Within the script tag, replace the comment with two variable Project Details
declarations: subtotal and grandTotal. Both should be declared as
undefined variables. Project Files:
9. Save your changes. 21f-cart-variables.htm
10. Preview the webpage in a web browser.
11. In the mandolin area, click the + button to increase the quantity by Estimated
one. Completion Time:
12. Click the Clear button. The quantity should now be empty. minutes
Purpose:
After completing this project, you will know how to use the typeof function and type checking functions in
JavaScript.
In an earlier project, we mentioned that the var keyword in front of a Project Files:
variable declaration tells JavaScript that the variable is indeed a 21h-practice-strict.htm
variable and not an object. Using the var keyword in front of a variable
also makes it easier for someone reading code to tell a variable apart Estimated
from an object. Completion Time:
minutes
To enforce the use of the var keyword, the phrase, use strict, can be
added within a script or a function. Video Reference:
Domain 2
Purpose: Topic: Primitive Data
After completing this project, you will know how to use the phrase, use Types Subtopic: Use
strict, to force all variables to be declared with the var keyword. Strict
Project Files:
Types 21i-cart-operators.htm
When input fields are created on an HTML form, they are objects in the
Estimated Completion
eyes of JavaScript. Many of these fields eventually contain numbers
used in a calculation. The only problem with this is that because these Time:
minutes
are objects, they cannot be used in calculations unless they are
converted to a number, like an integer or a floating decimal. This is just
one of many examples of data type conversions that can become Video Reference:
necessary on occasion in JavaScript. Domain 2
Topic: Primitive Data Types
Subtopic: Convert Between
Purpose: Data Types
After completing this project, you will have a better understanding of
when data type conversions are needed and how to perform those
conversions. Objectives Covered:
2 Variables, Data Types, and
Functions
Steps for Completion: 2.1 Declare and use variables
1. Open the 21i-cart-operators.htm file from the Music2 Student of primitive data types
folder in a web browser. Converting between data
types
2. Press the F12 key to bring up the console. (parseInt, parseFloat)
3. In the console, type:
typeof(document.getElementById(‘mantotal’))
Formatting Numbers
21j-formatting-numbers.htm
One of the most common needs for displaying data in JavaScript is the Estimated Completion
need to format numbers, especially those with a float data type. Time:
Floating numbers tend to display more places after the decimal point minutes
than desired. The toFixed method sets the number of places to display
after the decimal point. This is just one of many situations in which Video Reference:
numbers can be formatted. Domain 2
Topic: Primitive Data Types
Purpose: Subtopic: Format Numbers
After completing this project, you will be able to format numbers to
improve their look on a webpage. Objectives Covered:
2 Variables, Data Types, and
Functions
21 | Domain 2 2.1 Declare and
JavaScript use variables
Project Workbook
of primitive data types
1.j Formatting numbers
Steps for Completion:
1. Open the 21j-formatting-numbers.htm file from the Music2 Student folder in a web browser.
2. Click the Update Cart button. The sales tax and total amounts should be formatted to two decimal
places, not the number showing.
3. Open the 21j-formatting-numbers.htm file in your code editor.
4. Scroll down near the end of the file, specifically to this comment: <!-- the sales tax and the total need
to be converted to two decimal places -->
5. Inside the button code inside of the order_buttons div class, format the salesTax element to show two
numbers after the decimal point.
6. Format the grandtotal element to show two numbers after the decimal point.
7. Save your changes.
8. Preview the webpage in a web browser.
9. Click the Update Cart button. The sales tax and total should now display with two decimal places.
There are many ways to manipulate strings. To concatenate strings is to Project Files:
combine pieces of strings together. Knowing the length of a string will 21k-practice-strings.htm
determine if it will fit a defined space in a document. String operations
can also include controlling how numbers display within a webpage. Estimated Completion
Time:
Another string operation to consider is that of nesting quotes. Single minutes
quotes can be nested within double quotes and vice versa. The key is
knowing which quotes you wish to display, if applicable. Those should be
the inner quotes within a set of nested quotes. Video Reference:
Domain 2
Topic: Primitive Data Types
Purpose: Subtopic: String Operations;
Upon completing this project, you will know how to find the length of a Nested Quotes
string and be able to concatenate strings. You will also know how to
control nested quotes.
Objectives Covered:
2 Variables, Data Types, and
Steps for Completion: Functions
1. Open the 21k-practice-strings.htm file from the Music2 folder in a 2.1 Declare and use variables
of primitive data types
web browser.
2.1.k 1.k String
2. Adjust msg2 to display as a number set to three digits. operations
3. Save your changes. 2.1.l Single quote vs.
double quote (nesting)
4. Preview the webpage in a web browser.
5. Enter 40 for the number of hours you can practice and select the Enter key.
6. Open the Console.
7. Use the Console to find the length of the practiceweeks paragraph string. What is the length of the
practiceweeks paragraph string?
8. Return to your code editor.
9. Change the quote structure in msg7 to have the phrase, dream?, in single quotes.
10. Save your changes.
11. Preview the webpage in a web browser.
12. Enter 40 for the number of hours you can practice and select the Enter key. The phrase, dream?,
should be in single quotes.
Project Files:
Arrays 22a-tuningkits-array.htm
Sorting and searching an array will allow you to find content that should Project Files:
or should not be in the array. Sorting an array list will display the list in 22e-tuningkits-array.htm
alphabetical order. When searching for an array element, understand
that the first element in an array is element 0. Often, one will use the Estimated Completion
Console to search for an array element. If an element is in an array, it Time:
will return its position. If not, it will return a -1. minutes
Shift will remove the first item in an array, while unshift will add an item Project Files:
to the beginning of an array. Shift is similar to pop as they both remove 22g-tuningkits-array.htm
items from an array, though pop removes an item from the end of an
array. Unshift is similar to push as both commands add to an array, Estimated Completion
though push adds an item to the end of an array. Time:
minutes
Purpose:
Upon completing this project, you will be able to know when to use the Video Reference:
Console or array code to add or remove items from an array. You will be Domain 2
able to use shift to remove items from an array and unshift to add items Topic: Declare and Use Arrays
to an array. Subtopic: Shift and Unshift
The array index number is used to access an element in an array. The Project Files:
first item in an array is index number zero. After that, each item number 22h-tuningkits-array.htm
increments by one through the arrays.
Estimated Completion
Purpose: Time:
Upon completing this project, you will be able to access an array minutes
element using an index number.
Video Reference:
Steps for Completion: Domain 2
1. Open the 22h-tuningkits-array.htm file from the Music2 Student Topic: Declare and Use Arrays
folder. Subtopic: Access an Element;
Understanding Multi-
2. At the end of the updateList function, create an alert that says The Dimensional Arrays
first item in this array is and use the index number for the first
item in the array to access the element.
Objectives Covered:
3. Save your changes. 2 Variables, Data Types, and
4. Preview the webpage in a web browser. Functions
5. Select the Wedge mute check box. 2.2 Declare and use arrays
2.2.g 2.g
6. Click the Update List button. You should get an alert indicating that Length property
the first item in the array is the Wedge mute. 2.2.h 2.h
Access an array
Using Multi-Dimensional Projectelement
Details
Project Files:
Arrays 22j-tuningkits-array.htm
Project Files:
Methods 23a-cart-constants.htm
Purpose:
Upon completing this project, you will be able to recognize both Video Reference:
Domain 2
properties and methods and write code using methods.
Topic: Complete and Debug
Code on
Steps for Completion: Objects
1. For each expression, identify whether the expression is a property or Subtopic: Properties; Methods
method:
a. innerHTML: Objectives Covered:
2 Variables, Data Types, and
b. document.getElementById: Functions
2.3 Complete and debug code
c. push: that uses objects
d. length: 2.3.a 3.a Properties
2.3.b 3.b Methods
2. Open the 23a-cart-constants.htm file from the Music2 Student
folder.
3. Find the comment, // set the discount to two decimal points.
4. On the line below the comment, add a method to the discount result that will set the result to be fixed
to two decimal points.
5. Save your changes.
6. Preview the webpage in a web browser. The dollar amounts at the bottom of the page should be set to
two decimal points.
The date and time object can be used to build a date variable and Project Files:
retrieve date parts using mathematics and built-in JavaScript methods. 23d-practice-dates.htm
Date localization uses the toLocaleDateString method to have the date Project Files:
display in a localized format. As an example, location date formats are 23f-practice-dates.htm
mm/dd/yyyy for the USA and dd/mm/yyyy for the UK.
Estimated Completion
Purpose: Time:
Upon completing this project, you will be able to localize dates using 10-15 minutes
JavaScript.
Video Reference:
Steps for Completion: Domain 2
1. Open the 23f-practice-dates.htm file from the Music2 Student Topic: Complete and Debug
Code on
folder.
Objects
2. Replace the comment, // insert localized date, with a reference to Subtopic: Localization
the lessonStartDate variable, formatted in the UK format.
3. Save your changes.
Objectives Covered:
4. Preview the webpage in a web browser. 2 Variables, Data Types, and
Project Details
Functions
5. Click in the Enter the number of hours field.
2.3 Complete and debug code
6. Type: 20 and press the Enter key. Notice that the start date is in the Project Files:
that uses objects
UK format of dd/mm/yyyy. 23g-practice-dates.htm
3.f Localize date format (MM/
7. Return to your code editor. DD vs DD/MM)
8. Change the locale of the start date to display in mm/dd/yyyy format. Estimated Completion
9. Save your changes. Time:
10. Preview the webpage in a web browser. minutes
11. Click in the Enter the number of hours field.
12. Type: 20 and press the Enter key. Notice that the start date is in the Video Reference:
US format of mm/dd/yyyy. Domain 2
Topic: Complete and Debug
Purpose:
Upon completing this project, you will be able to add and subtract dates using JavaScript.
A random number generator can be used when creating an online quiz Project Files:
or game with JavaScript. The Math.random method will return the 24a-jukebox.htm
numbers 0 or 1. The number returned should then be multiplied by the Blues.mp4
number of random choices needed for the project and set to use the Happy.mp4
Math.floor function if you want the lowest possible integer returned (0
and 1 for two numbers, for example). Estimated Completion
Time:
Purpose: 5-10 minutes
Upon completing this project, you will be able to use the Math.random
method to allow JavaScript to choose randomly between two videos to Video Reference:
display upon webpage loading. Domain 2
Topic: Built-In Math Functions
Steps for Completion: Subtopic: Random
1. Open the 24a-jukebox.htm file from the Music2 Student folder.
2. Between the opening and closing script tags at the bottom of the Objectives Covered:
page, add a function named loadJukebox 2 Variables, Data Types, and
Functions
3. Within the loadJukebox function, add a variable named
2.4 Complete and debug code
videoNumber that is set to generate a random number of either 0 that uses built-in Math
or 1. functions
4. Add an if else statement that satisfies the following conditions: 4.a Random
a. If the videoNumber is 0, set the source of the HTML element videoJukebox to the Blues.mp4 video
in the Videos folder.
b. If the videoNumber is 1, set the source of the HTML element videoJukebox to the Happy.mp4 video
in the Videos folder.
5. Save your changes.
6. Preview the webpage in a web browser.
7. Refresh the webpage a few times. Sometimes a happy song will be ready to play and sometimes a
blues song will be ready to play.
Project Files:
Methods 24b-practice-numbers.htm
The round method will round a number to the nearest whole number.
The Math.round method in JavaScript is used to round numbers. The
Estimated Completion
absolute value of a number, represented by the Math.abs method, is Time:
5-10 minutes
the absolute distance of a number from zero. For example, -3 and 3
both have an absolute value of 3.
Video Reference:
Purpose: Domain 2
Topic: Built-In Math Functions
Upon completing this project, you will be able to write code using the
Subtopic: Round; Abs
Math.round method to round a number to the nearest whole number
using JavaScript. You will also be able to use the Math.abs method to
get the absolute value of a number. Objectives Covered:
2 Variables, Data Types, and
Functions
Steps for Completion: 2.4 Complete and debug code
1. Open the 24b-practice-numbers.htm file from the Music2 Student that uses built-in Math
folder. functions
2. Within the getPracticeHours function, round the result for the msg2 2.4.b 4.b Round
variable to the nearest whole number. 2.4.c Abs
3. Within the getPracticeHours function, make the hoursEntered variable calculation an absolute value.
4. Save your changes.
5. Preview the webpage in a web browser.
6. Click in the Enter the number of hours field.
7. Type: -20 and press the Enter key. You should see the result round up to one week and the number one
should be a positive integer since the Math.abs method was used.
The floor and ceiling method will not take into consideration what is Project Files:
after the decimal point in a number when displaying the number as an 24d-practice-numbers.htm
integer. To return the nearest lower whole number, use the Math.floor
method. To return the nearest higher whole number, use the Math.ceil Estimated Completion
method. At times, the floor or ceiling method can return a more precise Time:
whole number than the round method. When calculating days or time, minutes
the highest whole number is often needed, thus making it necessary to
use the Math.ceil method.
Video Reference:
Domain 2
Purpose: Topic: Built-In Math Functions
Upon completing this project, you will be able to determine which Subtopic: Floor and Ceiling
method is best to use between the Math.floor and Math.ceil methods to
get a more precise whole number return.
Objectives Covered:
2 Variables, Data Types, and
Steps for Completion: Functions
1. Open the 24d-practice-numbers.htm file from the Music2 folder 2.4 Complete and debug code
in a web browser. that uses built-in Math
functions
2. Click in the Enter the number of hours field. 2.4.d Floor
3. Type: 6 and press the Enter key. Notice that the results show 3 hours 2.4.e 4.e Ceil a
week of practice, which, multiplied by 6 weeks, falls short of the
total of 20 hours.
4. Open the 24d-practice-numbers.htm file in your code editor.
Estimated Completion
Purpose:
Upon completing this project, you will be able to create variables that
Time:
minutes
will return the min and max prices from a list of prices.
The Math.pow method will take a number and raise it according to the Project Files:
power number specified. When a number is raised to the power of a 24g-square-footage.htm
number, it takes the number multiplied by the same number as many
times as the power specifies. Estimated Completion
Time:
The Math.sqrt method will take a number and calculate the square root minutes
of the number. As an example, this is used to determine the length of a
side if the square footage is known. Video Reference:
Domain 2
Purpose: Topic: Built-In Math Functions
Upon completing this project, you will be able to write JavaScript code Subtopic: Pow; Sqrt
that will use the Math.pow method to find the square footage for the
user of a webpage. You will also be able to use the Math.sqrt method to Objectives Covered:
calculate and return the square root from the input of the square 2 Variables, Data Types, and
footage. Functions
2.4 Complete and debug code
that uses built-in Math
functions
Steps for Completion: 2.4.h 4.h Pow
2.4.iSqrt
32 | Domain 2 JavaScript Project Workbook
1. Open the 24g-square-footage.htm file from the Music2 folder.
2. In the getSquareFootage function, replace the comment, // add power method, with the method use to
raise the integer being parsed to the second power.
3. Replace the comment, // add square root method, with the method used to obtain the square root of
the integer being parsed.
4. Save your changes.
5. Preview the webpage in a web browser.
6. Enter the number 441 in the last text box on the webpage.
Functions are created so there is reusable code that can be used in Project Files:
multiple areas. If changes need to be made to code, with a function, the 25a-cart-numbers.htm
code will only need to be changed in one place instead of multiple
places. When code is reused it also lessens the amount of code to write Estimated Completion
and organizes the code. Time:
5-10 minutes
Purpose:
Upon completing this project, you will be able to create functions that Video Reference:
allow you to reuse code and organize the code. Domain 2
Topic: Parameters and Return
Steps for Completion: Values
Subtopic: Reusable Code
1. Open the 25a-cart-numbers.htm file from the Music2 Student
folder.
2. Replace the comment, // add addOne function, with a function Objectives Covered:
named addOne that will do the following: 2 Variables, Data Types, and
Functions
a. Store the existing quantity of a field in a variable named qty. Project Details
2.5 Complete and debug
b. Use a variable named newQty to parse, from the HTML element functions that accept
with the qty field, the value into an integer. Project Files:
parameters and return values
c. Increment the newQty variable by one. 5.a Reusable code
25b-cart-scopes.htm
d. Assign the newQty value to the HTML element with the qty field. 25b-main.js
Primitive data types can be easily set to be equal to another primitive Project Files:
data type, while objects cannot be changed in this way. An object 25e-cart-numbers.htm
references shared data space, so every object sharing the space will
change. Primitive data types will return a value that passes method Estimated Completion
arguments and creates a return. Object variables are referenced to a Time:
shared space and do not pass method arguments. With objects, it is minutes
best practice to set each object with its own value.
Video Reference:
Purpose: Domain 2
Upon completing this project, you will know the difference between a Topic: Parameters and Return
value and a reference. Values
Subtopic: Value vs. Reference
Steps for Completion:
1. Open the 25e-cart-numbers.htm file from the Music2 Student Objectives Covered:
folder in a web browser. 2 Variables, Data Types, and
Functions
2. Open the Console.
2.5 Complete and debug
3. In the Console, declare a variable of x and set it to 4 functions that accept
4. Declare a variable of y and set it to x. parameters and return values
5.e Value vs. reference
5. Set y to be equal to 7
6. What is the value of x after y has been made equal to 7?
8. Why will the object value change when it is set equal to another object?
2. In JavaScript, the symbol representing that something is not equal to a value is the symbol. [Not
Equals]
3. The less than and greater than symbols in JavaScript are the same as they are for basic
elements. [Greater Than and Less Than]
4. A common logical problem in JavaScript is not to have the proper for a less than or less than or
equal to situation. [Less Than or Equal To]
5. With greater than and greater than or equal to, you must figure out if the requires the number
in question to be included. [Greater Than or Equal To]
Decision Statements
10. When using the if keyword to see if a situation is true, you may want to check for another situation
in case the first situation is . [Else If]
11. Unlike an statement, a switch statement will not stop checking a condition after a first match.
[Switch]
Loops
13. The for loop runs a set number of times, either set by us or set by a . [For]
Purpose:
Upon completing this project, you will be able to determine when to use Video Reference:
the equal sign, the double equal sign, and the not equal sign. Domain 3
Topic: Logical and Comparison
Operators
Steps for Completion: Subtopic: Equals; Not Equals
1. Open the 31a-cart-evaluation.htm file from the Music3 Student
folder.
Objectives Covered:
2. In the script section near the bottom of the page, replace the 3 Decisions and Loops
comment, // add set operator, with the correct operator to set the
3.1 Evaluate expressions that
checkOutExists variable to false. use logical and comparison
3. Replace the comment, // add conditional operator, with the correct operators
operator to see if the checkOutExists variable is false. 1.a !=
1.g ==
4. Replace the comment, // add not equal operator, with the correct
operator to see if the checkOutExists variable is not false.
5. Save your changes.
6. Preview the webpage in a web browser.
7. Click the Checkout button. A checkout window should appear.
8. Click the Close Checkout button. The checkout window should close.
Greater than and less than comparison operators are normally used in Project Files:
conditional statements. A conditional statement is an if statement that 31c-practice-comparison.htm
returns a true or false.
Estimated Completion
Purpose: Time:
Upon completing this project, you will be able to create a greater than minutes
statement and a less than statement that will return a specific message
when a condition is met. Video Reference:
Domain 3
Steps for Completion: Topic: Logical and Comparison
1. Open the 31c-practice-comparison.htm file from the Music3 Operators
Subtopic: Greater Than and
Student folder.
Less Than
2. Replace the comment, // are less than 3, with the correct operator to
test if the hoursEntered are less than 3 hours.
Objectives Covered:
3. Replace the comment, // are more than 8, with the correct operator 3 Decisions and Loops
to test if the hoursEntered are more than 8 hours.
3.1 Evaluate expressions that
4. Save your changes. use logical and comparison
5. Preview the webpage in a web browser. operators
3.1.b 1.b <
3.1.c>
Objectives Covered:
3 Decisions and Loops
3.1 Evaluate expressions that
39 | Domain 3 JavaScript
use logical andProject Workbook
comparison
operators
1.f !
Purpose:
Upon completing this project, you will be able to use a not sign to shorten the code in a Boolean situation.
Estimated Completion
The or evaluator needs only one of the expressions being evaluated to
be true to act. The or symbol is || when used in JavaScript code. This Time:
minutes
symbol is created by holding the Shift key and pressing the Backslash
key twice.
Video Reference:
Domain 3
Purpose:
Topic: Logical and Comparison
Upon completing this project, you will be able determine the two Operators
expressions that need to return true for an and evaluator to return a set Subtopic: And; Or
message.
Objectives Covered:
Steps for Completion: 3 Decisions and Loops
1. Open the 31g-tuningkits-andor.htm file from the Music3 Student
3.1 Evaluate expressions that
folder. use logical and comparison
2. Within the updateList function, replace the comment, // and, with operators
the and operator. 3.1.h 1.h &&
3. Replace the comment, // or, with the or operator. 3.1.i||
4. Save your changes.
5. Preview the webpage in a web browser.
6. Select both the Wedge mute and Papps mute check boxes. Project Details
7. Click the Update List button. You should see a message stating that
both mutes are selected. Project Files:
8. Clear the Wedge mute check box. 32a-cart-evaluation.htm
9. Click the Update List button. You should see a message stating that
one mute is selected. Estimated Completion
Time:
If-Else minutes
Objectives Covered:
3 Decisions and Loops
40 | Domain 3 JavaScript
3.2 Project
Complete and debugWorkbook
decision statements
2.a Single alternative (if)
statement to check a condition. One or more actions can be taken if a condition is true. If a condition is
false, an else statement is then used to take one or more different actions.
Purpose:
Upon completing this project, you will know how to create an if statement and how the if statement
functions.
Objectives Covered:
3 Decisions and Loops
3. Within the updateList function, replace the comment, // start the for 3.3 Complete and debug loops
3.3.a 3.a For
loop, with the opening statement in a for loop to run through the
3.3.b 3.b For in
array of the tuningList variable. The loop should have the following:
a. A variable named i that starts at 0.
b. The length of the loop should be the length of the tuningList array.
c. The loop should increment by one each time the loop runs.
4. Save your changes.
5. Preview the webpage in a web browser..
6. Select the Papps mute check box.
7. Click the Update List button. The two tuning items and the Papps mute item should display as a
bulleted list.
DOM Tree
2. The document, every HTML element, and every descends from this document object.
[Document]
3. In the DOM, the two tags inside of the HTML tag are and body. [Body]
4. For the exam, know the starting point of a DOM and know how to a DOM. [Other HTML
Elements]
HTML Events
8. The two main actions taken as a result of an onclick event are a runs, or
within the event runs. [Onclick]
9. The onmouseout event triggers action when a mouse is moved from an object. [Onmouseout]
10. The onkeydown event triggers action when an item on the is pressed. [Onkeydown]
12. The document.write method allows us to write both HTML elements and to a webpage.
[Document.Write]
13. Once you get an element’s ID, you can change any of its using JavaScript. [GetElementById] 14.
15. The classlist. property shows the number of times a class is being used.
[GetElementsByClassName]
17. We can use the createElement method to place a new HTML element in a place on a
webpage.
[CreateElement]
A window is a browser window that a user will interact with online. The Project Files:
window object contains properties such as height and width. The 41a-cart-DOM.htm
window object also contains objects such as the document and all
objects contained within a document. The basic structure of a window Estimated Completion
and its objects is known as the DOM (Document Object Model).
Time:
minutes
Purpose:
Upon completing this project, you will understand objects and their
Video Reference:
properties, how they relate to each other, and how they are used on a Domain 4
webpage. You will be able to start a Topic: DOM Tree
DOM. Subtopic: Window
The document is a page of HTML or JavaScript code that will style a Estimated
webpage in a browser. The body is where the content code is found for Completion Time:
an HTML document. minutes
The onchange event usually happens when an object is immediately Project Files:
changed by an action. What sets this out as an event is that the user is 42a-practice-DOM.htm
interacting with the code through a keypress or mouse click. Or, an
onchange event can occur through a webpage loading or through an Estimated Completion
object changing a property, such as its value. Time:
minutes
Purpose:
Upon completing this project, you will know how an onchange event is Video Reference:
used in JavaScript. Domain 4
Topic: HTML Events
Steps for Completion: Subtopic: Onchange
1. Open the 42a-practice-DOM.htm file from the Music4 Student
folder. Objectives Covered:
2. Replace the HTML comment, <!-- call the getPracticeHours function 4 Document Object Model
when this field is changed -->, with a call to the getPracticeHours 4.2 Identify and handle
document, form, keyboard, and
function when the field changes.
mouse events
3. Save your changes. Onchange
4. Preview the webpage in a web browser.
5. Click in the Enter the number of hours field.
6. Type: 4 and press the Tab key. Notice the messages that appear as a result of your entering the
number of hours in a field.
The onmouseover event triggers action when a user rolls a mouse over Project Files:
an object. A common use of this is the display of an image changing 42b-products-DOM.htm
when a user rolls a mouse over it.
Estimated Completion
Time:
Purpose: minutes
Upon completing this project, you will be able to create an
onmouseover event that will return a larger image in a separate image
element. Video Reference:
Domain 4
Topic: HTML Events
Steps for Completion: Subtopic: Onmouseover
1. Open the 42b-products-DOM.htm file from the Music4 Student
folder.
Objectives Covered:
2. Find the mouseOverPic function near the bottom of the page. Notice 4 Document Object Model
that the function uses a parameter for the image display. 4.2 Identify and handle
3. Scroll back up to the section on thumbnails. document, form, keyboard, and
mouse events
Onmouseover
The onload event will return an action on the loading of an HTML Project Files:
element. The onload event is often used to call a function when a 42c-cart-DOM.htm
webpage loads.
Estimated Completion
An onclick event happens when an object or button is clicked and a Time:
code runs. The onclick event is the most frequently used event in minutes
JavaScript. The two main actions of an onclick event are that either a
function or a code within the event will run. Video Reference:
Domain 4
Purpose: Topic: HTML Events
Upon completing this project, you will be able to create an onload event Subtopic: Onload; Onclick
that will give an alert when a webpage is loaded.
Objectives Covered:
Steps for Completion: 4 Document Object Model
1. Open the 42c-cart-DOM.htm file from the Music4 Student folder. 4.2 Identify and handle
document, form, keyboard, and
2. In the body tag, create an onload event that will create an alert with mouse events
the text: This is an example of the onload event. 2.a Onload
3. Find the div tag with the class, itemquantity and the HTML 2.h Onclick
comments, <!-- run when clicked-->.
4. Within that div tag, replace each HTML comment with the event that triggers when each item is
clicked.
5. Save your changes.
6. Preview the webpage in a browser. An alert with the message you delivered should appear.
7. Close the alert.
8. Click the +, -, Clear, and Add Five buttons for the first two instruments. These buttons should, in
order, add one to the quantity, subtract one from the quantity, clear the quantity, and set the quantity
to five.
The onmouseout event is triggered and returns an action when a mouse Project Files:
moves away from an object. This is often used to display a message or 42e-cart-mouse.htm
change an object when a mouse moves away from an object.
Estimated Completion
Purpose: Time:
Upon completing this project, you will be able to create an onmouseout 5-10 minutes
event that will guide the user on page navigation.
Video Reference:
Steps for Completion: Domain 4
1. Open the 42e-cart-mouse.htm file from the Music4 Student folder. Topic: HTML Events
Subtopic: Onmouseout
2. Find the code for the div tag with the order_buttons class.
3. Replace the HMTL comment, <!--add instructions to click the button
when mouse moves away-->, with an alert function with the text, Objectives Covered:
Click the Update Cart button to update the order total, that 4 Document Object Model
4.2 Identify and handle
will occur when one moves the mouse away from the Update Cart
document, form, keyboard, and
button. mouse events
4. Save your changes. 2.j Onmouseout
5. Preview the webpage in a web browser.
6. Hover the mouse over the Update Cart button and then move away from the Update Cart button. You
should see an alert with instructions on how to use the Update Cart button.
The onkeydown event will return an action if any key on the keyboard is Project Files:
pressed. This event is often geared toward users who would rather not 42f-cart-mouse.htm
use a mouse in order to trigger action. In addition, the event could be
used to push users toward using a mouse. Estimated Completion
A similar event, onkeyup, fires when a key on the keyboard is released. Time:
minutes
Purpose:
Upon completing this project, you will be able to create an onkeydown Video Reference:
event. Domain 4
Topic: HTML Events
Steps for Completion: Subtopic: Onkeydown
1. Open the 42f-cart-mouse.htm file from the Music4 Student folder.
2. Find the HTML comment, <!-- encourage mouse use --> Objectives Covered:
3. Replace the HTML comment that will, when a key is pressed down, 4 Document Object Model
dislay an alert with this text: It may be easier to use buttons to 4.2 Identify and handle
document, form, keyboard, and
change this field. mouse events
4. Save your changes. 2.e Onkeydown
5. Preview the webpage in a web browser.
6. Click in the Quantity field of the Mandolin and type: 5. You should see an alert explaining that it may
be easier to use buttons to change the field.
7. Close your open files, both in the browser and in your code editor.
8. Save the file as 42f-cart-mouse-finished.htm
Purpose:
Upon completing this project, you will know when to change an Video Reference:
element’s innerHTML property. Domain 4
Topic: Output to HTML
Documents
Steps for Completion: Subtopic: InnerHTML
1. Open the 43a-practice-DOM.htm file from the Music4 Student
folder.
Objectives Covered:
2. Within the getPracticeHours function, replace both instances of the 4 Document Object Model
comment, // add code to set the element text, with the property and
4.3 Complete and debug code
operator necessary to set the text of each HTML element. that outputs to an HTML
3. Within the lessonSchedule function, replace both instances of the document
comment, // add code to append text to this element, with the 3.b InnerHTML
property and operator necessary to add the subsequent text to the
existing text within each HTML element.
4. Save your changes.
5. Preview the webpage in a web browser.
6. Click in the Enter the number of hours per week field.
7. Type: 10 and press the Enter key. You should see a message indicating when classes start. A total of
two class dates should be displayed.
The document.write method allows you to write text and HTML Project Files:
elements dynamically to a webpage. The document.write method will 43b-cart-DOM.htm
overwrite existing content, so this is best to use on a webpage with no
content.
Estimated Completion
Time:
Purpose: minutes
Upon completing this project, you will be able to use the
document.write method to add content dynamically to a webpage.
Video Reference
Domain 4
Steps for Completion: Topic: Output to HTML
1. Open the 43b-cart-DOM.htm file from the Music4 Student folder. Documents
2. Find the checkoutWindow function near the bottom of the page. Subtopic: Document.write
There are three ways in which JavaScript works with elements to set Project Files:
properties and run methods. They are: 44a-comparison-get.htm
Purpose:
Upon completing this project, you will be able to use the setAttribute method to allow the user to change
a heading style.
1. Input tags with typically do not have innerHTML text. [Retrieve Form Values]
2. We can get a value of an individual field at any time through the method. [DOM Path]
3. Though this is a different type of element, we are still using the attribute to retrieve what was
chosen. [Values from Elements]
4. Prepopulating a field is a good practice for when a field is the same for virtually every entry.
[Prepopulating Values]
5. Setting an input field to a type field will mask the field. [Masking Values]
Input Validation
6. With fields, you may want consistent casing no matter how data is entered. [Upper and Lower Case]
8. Some form validation can take place without , as simple HTML can be used instead.
[Validation]
10. You can add multiple to an onsubmit event to validate a form. [Onsubmit]
11. When a form is processed, a for processing the form data is specified, right in the form tag.
[Understand Post vs. Get]
12. The target is defined in the attribute of the form tag. [Understand Potential Submission Targets]
When a form is created, the information that is filled out will need to be Project Files:
accessed. An input tag does not have the innerHTML attribute, so the 51a-contact.htm
value attribute is used to retrieve the form information that was entered
in an input field. Estimated
Completion Time:
Purpose: 5-10 minutes
Upon completing this project, you will be able to use the value attribute
to retrieve the first and last name entered in an input field. Video Reference:
Domain 5
Steps for Completion: Topic: Retrieve Input and
Set Form
1. Open the 51a-contact.htm file from the Music5 Student folder.
Field Values
2. Within the fillTestResults function, replace the comment, // get what Subtopic: Retrieve Form
the user typed in for a first name, with a method that will retrieve Values
what the user typed into the firstname input field in the form.
3. Replace the comment, // get what the user typed in for a last name, Objectives Covered:
with a method that will retrieve what the user typed into the 5 HTML Forms
lastname input field in the form. 5.1 Complete and debug
4. Save your changes. code that retrieves form
input and sets form field
5. Preview the webpage in a web browser. values
6. Enter a first name and last name in the First and Last name fields. 1.a Retrieve form values
7. Click the Test form button. You should see a message with the name display.
When a form is created, the information that is filled out will need to be Project Files:
accessed. Forms are made of input fields and elements and a value is 51c-contact.htm
typed into a field, selected from a drop-down list, or assigned through
one or more options, such as a single radio button or one or more check Estimated
boxes. Completion Time:
5-10 minutes
Purpose:
Upon completing this project, you will be able to retrieve a value from Video Reference:
an element and access the selected information. Domain 5
Topic: Retrieve Input and
Set Form
Steps for Completion:
Field Values
1. Open the 51c-contact.htm file from the Music5 folder. Subtopic: Values from
2. In the fillTestResults function, following the firstName and lastName Elements
variables, create a variable named found that will contain the value
from the found field. Objectives Covered:
3. Add, to the testResults.innerHTML property, the text: You found us 5 HTML Forms
via, a space, the found variable, and a period. 5.1 Complete and debug
code that retrieves form
4. Save your changes.
input and sets form field
5. Preview the webpage in a web browser. values
6. Enter a first and last name and select a field for the How did you Get values form different
types of elements
hear about us field.
7. Click the Test form button. You should see a message on the page with your name and the choice you
made in the found field.
A prepopulated field will require less input for a user. The field will need Project Files:
to give the same exact answer in every instance to set a prepopulated 51d-contact.htm
answer. A field is often prepopulated through the use of an if or if-else
statement. Estimated
Completion Time:
minutes
Video Reference:
Domain 5
Topic: Retrieve Input and
Set Form
Field Values
Subtopic: Prepopulating
Values
Objectives Covered:
5 HTML Forms
5.1 Complete and debug
code that retrieves form
input and sets form field
59 | Domain 5 JavaScript Project Workbook
values
Prepopulate values
Purpose:
Upon completing this project, you will be able to set a field to prepopulate an answer based on an entry in
another field.
Sensitive information such as Social Security numbers can make a user Project Files:
nervous to enter the information into an input field, so it is a best 51e-contact.htm
practice to mask the sensitive values being entered. When masking a
value, the value will be replaced with dots or another symbol instead of Estimated
the value being entered. A password type field will mask a field. Completion Time:
minutes
Purpose:
Upon completing this project, you will be able to mask a field value Video Reference:
using a password type field. Domain 5
Topic: Retrieve Input and
Steps for Completion: Set Form
Field Values
1. Open the 51e-contact.htm file from the Music5 Student folder.
Subtopic: Masking Values
2. In the password field code on line 104 of the code, change the type
from text to password
Objectives Covered:
3. Save your changes. 5 HTML Forms
4. Preview the webpage in a web browser. 5.1 Complete and debug
code that retrieves form
5. Begin to type in the password field. You should see masked
input and sets form field
characters. values
1.e Mask values
Valid data needs to be entered on a form before the form is submitted. Project Files:
The two tasks of validation are to check that required fields have 52c-contact.htm
Estimated Completion
Time:
minutes
Video Reference:
Domain 5
Topic: Input Validation
Subtopic: Validation
Objectives Covered:
5 HTML Forms
5.2 Complete and debug
code that performs input
validation
Not blank
Purpose:
Upon completing this project, you will be able to add validations to fields.
NaN means Not a Number and will display when a calculation that Project Files:
expects a number takes place, but the calculation return is not a 52d-practice-DOM.htm
number. The written form of a number is not used in calculations, so
fields that make calculations should be set to require a number input. Estimated Completion
The NaN indicator can be corrected by validation or user training. Time:
5-10 minutes
Purpose:
Upon completing this project, you will better understand the cause of a Video Reference:
NaN message to appear. Domain 5
Topic: Input Validation
Steps for Completion: Subtopic: NaN
1. Open the 52d-practice-DOM.htm file from the Music5 Student
folder in a web browser. Objectives Covered:
5 HTML Forms
2. What does NaN stand for?
5.2 Complete and debug
3. Click in the Enter the number of hours per week field. code that performs input
validation
4. Type three and press the Enter key. Does NaN appear in the
NaN
message?
The onsubmit event is used to run the last code before a form submits Project Files:
data to be processed. The most common use of the onsubmit event is 53a-contact.htm
the use of one or more functions used to validate a form. One onsubmit
event can use multiple functions. Estimated Completion
Time:
Purpose: minutes
Upon completing this project, you will be able to create an onsubmit
event that uses existing functions to validate form fields on a form.
Video Reference:
Domain 5
Steps for Completion: Topic: Form Submission Process
1. Open the 53a-contact.htm file from the Music5 Student folder. Subtopic: Onsubmit
2. In the opening form tag, replace the comment, <!-- add code to run
checkFields-->, with code that will run the checkFields function when Objectives Covered:
the form is submitted. 5 HTML Forms
3. Save your changes. 5.3 Describe the form
submission process
4. Preview the webpage in a web browser. 3.a Onsubmit
5. Click the Send It button. You should get a message indicating that
the zip field is required.
Project Files:
Targets 53b-contact.htm
The two methods used to process data are post and get. Post is used
when information is posted in an area. Get is used when you are trying
Estimated Completion
to get information, typically used for a search engine. The method for Time:
5-10 minutes
processing is in the form tag. The get method will publish terms a user
enters in the URL, so do not use this method if data needs to be kept
secure. Video Reference:
Domain 5
Regarding potential submission targets for data on a form, there are Topic: Form Submission Process
three common targets: Subtopic: Understand Post
vs. Get;
Understand Potential
Submission Targets
Objectives Covered:
5 HTML Forms
5.3 Describe the form
submission process
5.3.b 3.b Post vs. get
5.3.c Potential targets
for submission
Purpose:
Upon completing this project, you will understand the post and get methods and how to write them in
code. You will also gain an understanding of the use of potential submission targets.
7. Close all of your open files in your browser and code editor.
8. Close your browser and your code editor.