যখন একটি ইভেন্ট ট্রিগার হয়, তখন স্ক্রীনওয়াই৷ মাউস ইভেন্ট মাউস পয়েন্টারের উল্লম্ব স্থানাঙ্ক প্রদান করে।
উদাহরণ
কিভাবে screenY প্রয়োগ করতে হয় তা শিখতে আপনি নিম্নলিখিত কোডটি চালানোর চেষ্টা করতে পারেন জাভাস্ক্রিপ্টে মাউস ইভেন্ট।
<!DOCTYPE html>
<html>
<body>
<p onclick = "coordsFunc(event)">Click here to get the x (horizontal) and y (vertical) coordinates of the mouse pointer.</p>
<script>
function coordsFunc(event) {
var x_coord = event.screenX;
var y_coord = event.screenY;
var xycoords = "X coords= " + x_coord + ", Y coords= " + y_coord;
document.write(xycoords);
}
</script>
</body>
</html>