window.event javascript code does not work in Firefox

前端 未结 2 1554
你的背包
你的背包 2021-01-28 22:02

I have an markup

            
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-28 22:16

    Firefox doesn't support windows.event object. Use these variables to store the value and it will work after that use your code:

    var event = e || window.event
    var assumed = (event.target || event.srcElement).id;
    

提交回复
热议问题