요소 위로 마우스 휠을 스크롤하면 온휠 속성 트리거.
예시
HTML의 요소 위로 마우스 휠을 스크롤할 때 다음 코드를 실행하여 스크립트를 실행할 수 있습니다 -
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id = "myDIV" onwheel = "display()">This is demo text. Roll the mouse wheel here.</div>
<script>
function display() {
alert("Mouse Wheel used!");
}
</script>
</body>
</html>