HTML事件属性onmouseout
2018-01-05 13:58 更新
HTML事件属性onmouseout
触发 onmouseout
属性事件当鼠标指针移出元素时。
HTML5中的新功能
没有。
句法
<element onmouseout="script or Javascript function name">
支持的标签
所有HTML元素,EXCEPT:
<base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, <title>
浏览器兼容性
![]() |
![]() |
![]() |
![]() |
![]() |
|
---|---|---|---|---|---|
onmouseout |
Yes | Yes | Yes | Yes | Yes |
例子
<!DOCTYPE html>
<html>
<body>
<p id="p1" onmouseout="onmouseOut()" onmouseup="mouseUp()">
Click the text!
</p>
<script>
function onmouseOut() {
console.log("Out");
}
function mouseUp() {
console.log("up");
}
</script>
</body>
</html>
以上内容是否对您有帮助:
更多建议: