exam questions

Exam 98-382 All Questions

View all questions & answers for the 98-382 exam

Exam 98-382 topic 1 question 5 discussion

Actual exam question from Microsoft's 98-382
Question #: 5
Topic #: 1
[All 98-382 Questions]

You are creating a dynamic HTML page by using JavaScript.
Your page has an image of the sun. When the user's mouse pointer moves across the image of the sun, the image should change to the image of the moon.
When the user's mouse pointer is no longer over the image should change back to the image of the sun.
You need to write the code for the image swap.
Which two events must you program for? (Choose two.)

  • A. onmouseup
  • B. onmouseout
  • C. onmosedown
  • D. onmouseover
  • E. onmouseenter
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️
References: References: https://www.w3schools.com/jsref/dom_obj_event.asp

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
chenku2
3 years, 1 month ago
123nickname123, it would work if it was one element, but onmouseenter doesn't apply to when the mouse hovers over a child of the element, which is why onmouseover is considered the correct answer.
upvoted 1 times
...
kisskeo
3 years, 9 months ago
BD - Correct
upvoted 1 times
...
123nickname123
4 years, 4 months ago
Wouldn't onmouseenter do the same as onmouseover? Would I lose points if I said onmouseenter?
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...