node.addEventListener('click', fun, false);
node.attachevent('onclick', fun);
Node['onclick']=fun
node.addEventListener('click', fun(arg1,arg2,arg3), false);
node.attachevent('onclick', fun(arg1,arg2,arg3));
Node['onclick']=fun(arg1,arg2,arg3)
function bindFunction(obj, func){
var args = [];
for(var i =2; i < arguments.length; i++) {
args.push(arguments[i]);
}
return function(){
func.apply(obj, args);
};
};
function bindFunction(obj, func){
var args = [];
for(var i =2; i < arguments.length; i++) {
args.push(arguments[i]);
}
return function(){
func.apply(obj, args);
};
};
window['OYF_MARK']['bindFunction'] = bindFunction;
function addEvent(node, type, listener){
//使用前面的方法检查兼容性以保证平稳退化
if (!isCompatible()) {
return false
}
if (!(node = $(node)))
return false;
if (node.addEventListener) {
//W3C的方法(冒泡事件,如果将false改为true,则为捕获事件)
node.addEventListener(type, listener, false);
return true;
}
else
if (node.attachEvent) {
//MSIE的方法
node['e' + type + listener] = listener;
node[type + listener] = function(){
node['e' + type + listener](window.event);
}
node.attachEvent('on' + type, node[type + listener]);
return true;
}
//若两种方法都不具备则返回false
return false;
};
window['OYF_MARK']['addEvent'] = addEvent;
//注册新的onclick事件处理函数 OYF_MARK.addEvent(e,'click',OYF_MARK.bindFunction(e,getContainerDetail,x,y,containid));
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有