• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Quiz

Test your knowledge of JavaScript windows and frames by answering the following questions.

Questions

1:Which of the following methods displays a dialog box with OK and Cancel buttons, and waits for a response?
  1. window.alert

  2. window.confirm

  3. window.prompt

A1: b. The window.confirm method displays a dialog box with OK and Cancel buttons.
2:What does the window.setTimeout method do?
  1. Executes a JavaScript statement after a delay.

  2. Locks up the browser for the specified amount of time.

  3. Sets the amount of time before the browser exits automatically.

A2: a. The window.setTimeout method executes a JavaScript statement after a delay.
3:You're working with a document that contains three frames with the names first, second, and third. If a script in the second frame needs to refer to the first frame, what is the correct syntax?
  1. window.first

  2. parent.first

  3. frames.first

A3: b. The script in the second frame would use parent.first to refer to the first frame.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint