2019-05-30 关于事件对象

<input style="width:80px;height:20px" id="aaa" age="21" type="button" class="fff" value="qs" onclick="handeler(abc,event)">

var abc="ooo"

var handeler=  function(eve,ttt){

  console.log(ttt)

  console.log(eve)

    }

事件对象中,实参必须是event,而接受的实参可以怎么样都可以,例如eve就没有问题。

还有在ie8以上,就不需要再区分ie和谷歌了,都是event 而不是window.event

猜你喜欢

转载自blog.csdn.net/weixin_34393428/article/details/90826853