摘要:
attachEvent与addEventListener区别适应的浏览器版本不同,同时在使用的过程中要注意attachEvent方法 按钮onclickaddEventListener方法 按钮click两者使用的原理:可对执行的优先级不一样的事件进行操作:attachEvent方法,为某一事件附加其它的处理事件。(不支持Mozilla系列)addEventListener方法 用于 Mozilla系列举例:Js代码document.getElementById(“btn”).onclick=method1; document.getElementById(“btn”).onclick=met 阅读全文
posted @ 2013-10-29 22:00
勤奋的码农
阅读(1032)
评论(0)
推荐(0)
摘要:
在园里看到一道面试题,Click Herevar node=document.getElementById('test');node.onclick=function(){ console.log('1');}node.addEventListener('click',function(){ console.log('2');},false);node.onclick=function(){ console.log('3');}node.addEventListener('click',functi 阅读全文
posted @ 2013-10-29 21:56
勤奋的码农
阅读(954)
评论(3)
推荐(0)
浙公网安备 33010602011771号