마우스오버 속성은 마우스 포인터가 HTML의 요소 위로 이동할 때 트리거됩니다.
예시
다음 코드를 실행하여 onmouseover 를 구현할 수 있습니다. 속성 -
<!DOCTYPE html>
<html>
<body>
<h3 id = "myid" onmouseover = "display()">
This is demo heading.
</h3>
<p>Keep the mouse cursor on the heading to change the color.</p>
<script>
function display() {
document.getElementById("myid").style.color = "red";
}
</script>
</body>
</html>