1D0-735 CIW JavaScript Specialist

Loading demo links...

Showing 7–9 of 10 questions

Question 7

Consider the following code:

The code displays a pop-up alert message if the username is less than 6 characters and submits the form. What change should be made to prevent the form from submitted if the username is less than 6 characters?

Select an option, then click Submit answer.

  • The function call on line 13 should be changed to validateForm();

  • Return false; should be added after the alert call on line 7

  • submit false; should be added after the alert call on line 7

  • The submit event handler on line 13 should be moved to line 16

Question 8

Consider the following code:

”sofa”

Which of the following is true based on the above code?

Select an option, then click Submit answer.

  • The function sofaPic will be called upon when sofaPic image loads

  • The function sofaPic is called when the image fails to load

  • The function sofaPic is called when the mouse pointer moves off the image

  • The function sofaPic is called when the mouse pointer moves over the image

Question 9

Jackson was testing his code when the Web browser became locked and he had to close it to stop the script What might he have accidentally done when coding his Web site?

Select an option, then click Submit answer.

  • Coded an infinite loop

  • Coded a frame that breaks the same origin policy

  • Coded an input element that is vulnerable to XSS

  • Coded deprecated HTML