Search.../

onMouseOut( )

Adds an event handler that runs when the pointer is moved off of the element.

You can also define an event handler using the Properties and Events panel.

Syntax

function onMouseOut(handler: MouseEventHandler): Element
handler: function MouseEventHandler(event: MouseEvent): void

onMouseOut Parameters

NAME
TYPE
DESCRIPTION
handler

The name of the function or the function expression to run when the pointer is moved off of the element.

Returns

The element to which the event handler was added.

Return Type:

MouseEventHandler Parameters

NAME
TYPE
DESCRIPTION
event

The mouse event that occurred.

Returns

This function does not return anything.

Return Type:

void
Mixed in from:$w.FormElement

Was this helpful?

Get the mouse event info when the mouse exits an element

Copy Code
1$w("#myElement").onMouseOut( (event) => {
2 let clientX = event.clientX; // 362
3 let clientY = event.clientY; // 244
4 let offsetX = event.offsetX; // 10
5 let offsetY = event.offsetY; // 12
6 let pageX = event.pageX; // 362
7 let pageY = event.pageY; // 376
8 let screenX = event.screenX; // 3897
9 let screenY = event.screenY; // 362
10} );