8
我似乎无法得到onMouseWheel事件在Firefox中的HTML5画布。下面的代码片段将按预期在Chrome和IE9,但在Firefox我只收到click事件:HTML5画布鼠标滚轮事件
<!DOCTYPE html>
<html>
<body>
<canvas id="TestCanvas" tabindex="2" onmousewheel="window.alert('wheel!')" onclick="window.alert('click!')" style="width:90%;height:90%;margin-left:auto;margin-right:auto border:1px solid green;"></canvas>
</body>
</html>
据我见过的规格,onMouseWheel应该对HTML5元素的标准事件。难道我做错了什么?
感谢弥敦道,在FF 4.工作原理是,一个Firefox,只有事件? – Ryan 2011-03-23 21:45:23
@Ryan我相信如此。 – 2011-03-24 00:27:37