フリー問題

Salesforce Certified JavaScript Developer のフリー問題 11 / 20 問目

問題文

A single listener is attached to a list element and handles clicks on the items inside it. Inside the handler, which property refers to the item that was actually clicked?

選択肢

  1. event.currentTarget, which changes as the event travels and therefore always reports the innermost element that the user actually pressed at the moment the handler is executing.
  2. event.target, which is the element where the event originated.
  3. event.relatedTarget, which is the element paired with the click.
  4. The this value inside the handler, which equals the clicked item whenever the handler is written as an arrow function in the surrounding scope.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。