Browser default global $ function

前端 未结 2 1080
傲寒
傲寒 2021-01-22 09:51

I\'ve noticed that there appears to be a global function called $ in some browsers which is NOT jQuery, but I can\'t seem to find any documentation on it. What is it?

Fi

2条回答
  •  我在风中等你
    2021-01-22 10:24

    There is no global $ in browsers.

    Some browsers provide a $ in the scope of the Console (if there isn't a global one already).

    For example Chrome's documentation says:

    $(selector) returns the reference to the first DOM element with the specified CSS selector. This function is an alias for the document.querySelector() function.

提交回复
热议问题