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
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)- A83% (38)
- B11% (5)
- C4% (2)
- D2% (1)
Community Discussion
No community discussion yet for this question.
