dsfsf

Cards (20)

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