GlobalEventHandlers.onmouseleave

GlobalEventHandlers mixin 中的 onmouseleave 属性是用于处理鼠标移出(mouseleave)事件的事件管理器(EventHandler)。

mouseleave事件在定点设备(通常来说指的是鼠标) 移出某个元素时触发。

语法

element.onmouseleave = handlerFunction;
var handlerFunction = element.onmouseleave;

handlerFunction 可以是 null ,也可以是一个用以指示如何处理该事件的 JavaScript 函数 。

规范

Specification Status Comment
HTML Living Standard
onmouseleave
Living Standard  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onmouseleaveChrome Full support 30Edge Full support YesFirefox Full support 10IE Full support 5.5Opera Full support 17Safari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 10Opera Android Full support 18Safari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

参阅