What does the '#' sign mean in JavaScript?

后端 未结 8 1098
闹比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:24

    It's an element ID e.g: `...

    When u need to access this div with JS or jQuery just call it $("#xyz").do something

    for class

    ....
    >> $(".abc")

提交回复
热议问题