Firefox “window.event is undefined” error

后端 未结 7 1390
悲哀的现实
悲哀的现实 2020-12-03 11:38

I have this script:

function postBackByObject(e) {
   var o = window.event.srcElement || e.target;
   if (o.tagName == \"INPUT\" && o.type == \"check         


        
7条回答
  •  萌比男神i
    2020-12-03 12:14

    Pass the event on the onClick event like this:

    onclick="myCustomFunction(event);"

    It does work and you can access the event object!

提交回复
热议问题