What does the '#' sign mean in JavaScript?

后端 未结 8 1094
闹比i
闹比i 2021-02-07 20:48

I\'m new to Javascript and I\'m try to understand some code. I don\'t understand and I can\'t find any documentation about the # sign.

$(function ()         


        
8条回答
  •  [愿得一人]
    2021-02-07 21:14

    That isn't vanilla Javascript! That's jQuery!

    In jQuery you can select elements via CSS style selectors. In this case, #x is a CSS selector to select all elements with the id x.

提交回复
热议问题