เหตุการณ์ onmouseenter จะทริกเกอร์เมื่อคุณวางเมาส์ที่ตัวชี้
ตัวอย่าง
คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อเรียนรู้วิธีการทำงานกับ onmouseenter เหตุการณ์ใน JavaScript -
<html>
<head>
<script>
<!--
function sayHello() {
alert("Mouse Hover")
}
//-->
</script>
</head>
<body>
<p onmouseenter = "sayHello()">This is demo text for mouseenter event.</p>
</body>
</html>