/*滚轮事件*/
function MousewheelHandle(obj,handle){
var info = navigator.userAgent;
var down = null;//用来记录滚轮的上下,down = true来到时候表示向下(尽量设置全局变量)
if(info.indexOf("Firefox")!=-1){
obj.addEventListener("DOMMouseScroll" , function(event) {
var ev = event||window.event;
if(ev.detail>0){
//不做具体的事情
down = true;
}else{
down = false;
}
// 调用外部传递的事件处理程序
handle.call(obj,down,ev);
},false)
}else{
obj.onmousewheel = function(event){
var ev = event||window.event;
if(ev.wheelDelta>0){
down = false;
}else{
down = true;
}
handle.apply(obj,[down,ev]);
}
}
}
//