Recently when I writing js code, I found something..
- I didn't define a variable which refers element using its id.
- And I gave an event to that id.
- It worked!!! without defining variable using "document.getElementById('id')"
For example :
html :
<div id="abc"></div>
console :
abc;
console result :
<div id="abc"></div>
Why this happening? I didn't define variable 'abc' which refers div#abc.
ps. This happens not in ie. it happens in chrome.