DOMMouseScroll

書式

オブジェクト.addEventListener("DOMMouseScroll", "イベント発生時の処理", フラグ)

説明

マウスのホイールが回された時に発生します。Firefoxで利用できます。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript"><!--
window.onload = function() {
document.getElementById("result").addEventListener("DOMMouseScroll",
function(){
document.getElementById("result").innerHTML = "DOM Mouse Scroll Event";
} ,false);
}
// --></script>
</head>
<body>
<h1 id="header">DOMMouseScroll</h1>
<div id="result" style="width:300px;height:200px;border:1px solid black"></div>
</body>
</html>