Solved

Which of Following Codes of an Event Handler Records the Exact

Question 32

Multiple Choice

Which of following codes of an event handler records the exact window position of the mouse pointer as it maneuvers across an element?


A) document.getElementById("element1") .onmouseenter = trackPointer; function trackPointer(e) { var hPos = e.clientX; document.getElementById("element2") .innerText;
B) document.getElementById("element1") .onmouseclick = trackPointer; function trackPointer(e) { var vPos = e.clientY; document.getElementById("element2") .innerText = " (" + hPos + ", " + vPos + ") "; }
C) document.getElementById("element1") .onmousemove = trackPointer; function trackPointer(e) { var hPos = e.clientX; var vPos = e.clientY; document.getElementById("element2") .innerText = " (" + hPos + ", " + vPos + ") "; }
D) document.getElementById("element1") .onmouseup = trackPointer; function trackPointer(e) { var hPos = e.clientX; document.getElementById("element2") .innerText = " (" + hPos + ", " + vPos + ") "; }

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents