Home  >  Q&A  >  body text

javascript - About Chrome browser debugging

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_leeringa_lee2662 days ago873

reply all(2)I'll reply

  • 阿神

    阿神2017-07-05 10:44:33

    $(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.

    reply
    0
  • PHP中文网

    PHP中文网2017-07-05 10:44:33

    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? ?

    reply
    0
  • Cancelreply