如何从onmouseout事件中调用JavaScript函数?
当您将鼠标从该元素移出时,onmouseout会触发。
示例
您可以尝试运行以下示例,以了解如何从onmouseout事件中调用JavaScript函数
<html>
<head>
<script>
<!--
function over() {
document.write ("Mouse Over");
}
function out() {
document.write ("Mouse Out");
}
//-->
</script>
</head>
<body>
<p>Bring your mouse inside the division to see the result:</p>
<div onmouseover="over()" onmouseout="out()">
<h2> This is inside the division </h2>
</div>
</body>
</html>