• Onmousemove

     

    This example demonstrates the difference between onmousemove, onmouseleave and onmouseout.

    The onmousemove event occurs every time the mouse pointer is moved over the div element.

    The mouseleave event only occurs when the mouse pointer is moved out of the div element.

    The onmouseout event occurs when the mouse pointer is moved out of the div element, and when it leaves its child elements (p and span).

    onmousemove:
    Mouse over and leave me!

    onmouseleave:
    Mouse over and leave me!

    onmouseout:
    Mouse over and leave me!