在浏览器中有不同的值e.target [英] different value e.target in browers

查看:194
本文介绍了在浏览器中有不同的值e.target的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么Mozilla和Chrome有e.target的其他价值。
我为你准备了这个例子。





Google Chrome:



更多关于什么的说明是ECMA规格参见:
http:// www。 ecma-international.org/publications/standards/Ecma-262.htm


I want to know why Mozilla and Chrome have other value of e.target. I prepared this example for you.

https://jsfiddle.net/qdthnmdx/

In the Mozilla e.target has value:

<button type="button">

But in the Chrome this is:

<span>Sometext</span>

Is it some bug?

解决方案

You have to know that every browser have their own implementation of the specificacion from JavaScript, here i have diferent result of your code for you even on Internet explore and google Chrone exist difference:

IE 11:

Google Chrome:

For more clarification in what is ECMA Specs is see: http://www.ecma-international.org/publications/standards/Ecma-262.htm

这篇关于在浏览器中有不同的值e.target的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆