我是靠谱客的博主 机灵大叔,这篇文章主要介绍火狐中不存在 window.event 对象,现在分享给大家,希望可以做个参考。

火狐不存在window.event 对象,解决办法:

<input type='button' value='click me' id='a_x' οnclick="doKeyDown('a')"/>

<script type="text/javascript">
var doKeyDown = function(arg){
    alert(arguments.callee.caller.toString());//这样是不是一目了然了?argument.callee就是函数本身,caller函数的调用函数.具体请google.
    var _e = window.event || arguments.callee.caller.arguments[0]; //可兼容火狐
    alert(_e);
    alert(arg);

}

</script>

最后

以上就是机灵大叔最近收集整理的关于火狐中不存在 window.event 对象的全部内容,更多相关火狐中不存在内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部