火狐下用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});
赞
踩
火狐下用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});
转载于:https://www.cnblogs.com/lr-blog/p/6595621.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。