In javascript I always use docuemtn.getElementById to access DOM elements, but recently I accidentally accessed it using id only and it worked. Example:
<input id="element_id" type="text">
...
wono
|
|
wono
Please don’t use id-named global variables to access elements
This behavior is described in the specification, so it’s a kind of standard. But it is supported mainly for compatibility.
https://javascript.info/searching-elements-dom
Do you want to delete?