Save
dsfsf
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
John
Visit profile
Cards (20)
Who is the instructor for Lesson 5?
Joana Marie C. Tolentino
View source
What are the learning objectives of this unit?
Describe
client-side computation
and form validation.
Create a
JavaScript-driven
form for real-time validation.
Use JavaScript to modify
HTML
and
CSS
properties.
Develop an interactive web page with JavaScript.
View source
What is the purpose of the Window Object in JavaScript?
To manage
browser
windows and dialogs
View source
What is a dialog box in the context of the Window Object?
A
window
that
performs
a
simple
task
View source
What global functions can be accessed using the window object?
window.
alert()
, window.
confirm()
, window.
prompt()
View source
What does the confirm() method do?
It
asks
for
user
confirmation before a task
View source
What buttons are included in the confirm dialog box?
OK
and
CANCEL
buttons
View source
What is the syntax for the alert method?
alert(
message
);
View source
What will the following code display: alert("Danger! A virus was detected.")?
A
dialog box
with a
warning message
View source
What does the alert() method do?
Displays
a
simple
message
to
the
user
View source
What is the syntax for the confirm method?
confirm(question);
View source
What does the confirm("Are you sure you want to delete?") prompt the user for?
Confirmation
before
deleting
View source
What is the purpose of the if...else statement?
To execute code based on a
condition
View source
What is the syntax for an if statement?
if (
condition
) { statements }
else
{ statements }
View source
What will happen if age = 19 and the condition age > 18 is true?
Message about driving without
supervision
View source
What does the if statement specify?
A block of code to
execute
if true
View source
What will the confirm method return if the user clicks OK?
True
View source
What will the confirm method return if the user clicks Cancel?
False
View source
What message is displayed if age = 17 and the condition age > 18 is false?
You need to wait until you're 18
View source
How does the confirm() method work with an if-else statement?
Prompts user for confirmation
Executes code based on user's response
Displays different messages for
true/false
conditions
View source