火狐下用window.event来进行相应操作时,会显示undefined,其他浏览器可以,

解决方法:

1,传入对象

$("a").on("click",function(e){var event = e || window.event});

2,不传入对象

$("a").on("click",function(){var event = arguments.callee.caller.arguments[0] || window.event});

相关文章:

  • 2021-08-23
  • 2021-08-08
  • 2022-12-23
  • 2021-06-20
  • 2021-11-04
  • 2022-12-23
  • 2021-11-19
  • 2021-08-13
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案