Selecting element w/o selector in js

I knew in js I can select this -> <div id='x'>xd</div> element via document.getElementById('x') or document.querySelector('#x'), but today I discovered i can just select it writing x like it’s a variable in my script already. The question is what is this method called and what is browser support?

42 thoughts on “Selecting element w/o selector in js”

  1. 685965 371786This put up is totaly unrelated to what I used to be seeking google for, however it was indexed on the initial page. I guess your doing something appropriate if Google likes you adequate to place you at the initial page of a non related search. 971470

    Reply

Leave a Comment