nerdexam
CIW

1D0-635 · Question #46

Consider the following code: When an invalid e-mail address is entered, an alert is displayed to the user, but the form submission is not interrupted. What changes need to be made to the script in…

The correct answer is A. Add return false after the alert() statement. See the full explanation below for the reasoning.

Question

Consider the following code:

When an invalid e-mail address is entered, an alert is displayed to the user, but the form submission is not interrupted. What changes need to be made to the script in order to abort the submission if an invalid e-mail address is entered?

Exhibit

1D0-635 question #46 exhibit

Options

  • AAdd return false after the alert() statement.
  • BChange return to validate in the function call.
  • CAdd validate false after the alert() statement.
  • DRemove the return keyword from the function call and put it in front of the alert() statement.

How the community answered

(46 responses)
  • A
    83% (38)
  • B
    11% (5)
  • C
    4% (2)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1D0-635 Practice