Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is/are the purpose(s) of JavaScript events? i) Provide a dynamic interface to a webpage. ii) Provide a static interface to a webpage.

  • A.Only (i)
  • B.Only (ii)
  • C.Both (i) and (ii)
  • D.Neither (i) nor (ii)

Answer: A

Only statement i gives the purpose of JavaScript events: they provide a dynamic interface to a webpage, since the page can respond to what the user does, such as a click or a key press. A static interface would not need events, so statement ii is wrong. So 'Only (i)' is correct. Examples of events are onclick, onload and onkeydown, which trigger code when the user clicks, when a page has loaded or when a key is pressed.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.