我想添加一个事件侦听器点击,我想知道,被点击检测子节点数量
function evl(etna) {
document.addEventListener("click", function (el) {
alert("You clicked on " + 'the name of element that was clicked or his array code');
}, false);
};
节点的位置etna
是:
document.getElementsByTagName("*");
在IE8及以下版本中,事件不会设置this,所以它仍然指向全局窗口对象:[sitepoint.com](http://www.sitepoint.com/javascript-this-event-handlers /)。 –
可能。但看起来我们都错过了附加元素事件的一个点:) –
我不想现在他的arrey位置也喜欢el [10] – Karim