Weird jQuery Behavior

时间:2015-11-12 11:46:23

标签: javascript jquery html

Can someone please explain why jQuery automatically sets a variable using the ids in a HTML document? I am using jsFiddle to test this behaviour with jQuery 1.11.0

<div id ="hero"></div>  
alert(hero);

This displays the DOM Object.

0 个答案:

没有答案