不會處理兼容的同學看這里。
我也是新手,不知道寫的對不對。
//給元素綁定事件
function?bind(obj,type,func)?{
????obj.addEventListener???obj.addEventListener(type,func,false)?:?obj.attachEvent('on'+type,?function?(event)?{
????????return?func.call(obj,event);
????});
}我也是新手,不知道寫的對不對。
//給元素綁定事件
function?bind(obj,type,func)?{
????obj.addEventListener???obj.addEventListener(type,func,false)?:?obj.attachEvent('on'+type,?function?(event)?{
????????return?func.call(obj,event);
????});
}2016-07-10
舉報
2016-07-24
有啥對不對的 ,只要測試實現效果不就行了