1.dom.onmousewheel = function() { // js鼠标滑动事件};IE, Chrome都认识,但是FireFox浏览器,要使用DOMMouseScroll;2.(e.wheelDelta)//判断浏览器IE,谷歌滑轮事件(e.detail) //Firefox滑轮事...
分类:
Web程序 时间:
2015-12-25 16:35:46
阅读次数:
277
1.滚轮事件: IE和chrome支持onmousewheel(属性DOM2级),而FF支持DOMMouseScroll(属于DOM3级),而DOM事件只能用addEventListener绑定才有用,而addEventListener是标准浏览器支持的,IE低版本是不支持的,所以可以对鼠标滚轮事件...
分类:
其他好文 时间:
2015-12-11 01:17:41
阅读次数:
182
byzhangxinxufromhttp://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=3175一、学无止境、温故知新//zxx: 本段与技术无关,一些很个人的吐槽,可以跳过已经没有了小学生时代过目不忘的记忆力了,很多...
分类:
Web程序 时间:
2015-11-03 12:06:48
阅读次数:
217
4,IE与FF脚本兼容性问题事件对象event ev事件委托oEvent.srcElement oEvent.target滚轮onmousewheel DOMMouseScroll滚轮oEvent.wheelDelta oEven...
分类:
其他好文 时间:
2015-10-27 00:22:51
阅读次数:
242
1.document.body.onmousewheel这个事件在火狐下要这样写document.body.addEventListener("DOMMouseScroll", function(event) {});并且非火狐用e.deltaY判断方向,火狐用下e/detail判断方向2.fade...
分类:
Web程序 时间:
2015-10-14 17:54:44
阅读次数:
145
直接上代码://一般浏览器obj.onmousescroll = function(){ blablablabla; };//火狐浏览器document.addEventListener('DOMMouseScroll',function(){ blablablabal;},false...
分类:
其他好文 时间:
2015-08-07 21:45:02
阅读次数:
96
鼠标滚轮事件//兼容性写法,该函数也是网上别人写的,不过找不到出处了,蛮好的,所有我也没有必要修改了//判断鼠标滚轮滚动方向if (window.addEventListener)//FF,火狐浏览器会识别该方法 window.addEventListener('DOMMouseScroll'...
分类:
Web程序 时间:
2015-08-01 20:23:15
阅读次数:
116
FF使用DOMMouseScroll,其他浏览器使用mousewheelFF在一个特殊的属性event.detail。表示滚动的值event.detail正数:向下滚动,负数:向上滚动滚动一次值3,向上滚动一页值为-32768,向下滚动一页值为+32768。其它值代表滚动的行数, 方向代表了数值的正...
分类:
其他好文 时间:
2015-07-15 22:25:47
阅读次数:
153
添加事件(有兼容性) /*注册事件*/ if(document.addEventListener){ document.addEventListener('DOMMouseScroll',scrollFunc,false); } window.onmousewheel=documen...
分类:
其他好文 时间:
2015-07-15 20:35:19
阅读次数:
180
by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=3175一、学无止境、温故知新//zxx: 本段与技术无关,一些很个人的吐槽,可以跳过已经没有了小学生时代过目不忘的记忆力了...
分类:
Web程序 时间:
2015-07-15 16:49:30
阅读次数:
224