Khi con trỏ chuột di chuyển ra khỏi một phần tử, onmouseout trình kích hoạt thuộc tính. Bạn có thể thử mã sau để triển khai onmouseout thuộc tính -
Ví dụ
<!DOCTYPE html>
<html>
<body>
<h3 id = "myid" onmouseout = "mouseOut()">
This is demo heading.
</h3>
<p>Click above and then release.</p>
<script>
function mouseOut() {
document.getElementById("myid").style.color = "red";
}
</script>
</body>
</html>