Why is my onclick event not registered in Firefox?

后端 未结 4 1787
南方客
南方客 2021-01-18 21:08

I have a list item with an onclick event. It runs in Chrome and Internet Explorer, but not Firefox. Any suggestions?

  • 4条回答
    •  一个人的身影
      2021-01-18 21:38

      In Firefox, the event object is not global. You have to access it within your script tags not in html.

      onclick works likes this

    • test
    提交回复
    热议问题