javascript - About Chrome browser debugging
ringa_lee
ringa_lee 2017-07-05 10:42:33
0
2
821

I’m not sure 0: What does this mean? In addition, how to obtain the value inside 0:? Thank you. Can you tell me?

ringa_lee
ringa_lee

ringa_lee

reply all (2)
阿神

$(element).get(0) || $(element)[0]... 0 is its key, which can be understood as an array-like object. It's just that this attribute refers to this dom object.

    Ty80

    This 0 is the subscript of the array. In fact, if you pay attention, here is a reminder that the array queried by your selector has 1 element.
    The text inside is dom[0].text(), or dom[0].html().

    Can I complain about how small your screenshots are? ?

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!