search

Home  >  Q&A  >  body text

javascript - Jquery selector issue for crawling web pages

When using Jquery to analyze web pages, I feel that both writing methods should be able to choose.
But in fact, the above way of writing is OK, but the following way is not.
The URL is: http://www.shindengen.co.jp/t...

p#newsTab ul.panel dl
p#newsTab ul.panel dl.clearfix

The dl I see in Chrome's F12 developer tool is <dl class="clearfix">
If I look directly at the source code, there is no class attribute. The problem should be here.
But why are the source code and developer tools displayed differently?

滿天的星座滿天的星座2780 days ago665

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-05-18 10:51:44

    In the source code: view-source:http://www.shindengen.co.jp/t...
    I don’t see the dl.clearfix element. Why do you add the .clearfix selector to it?

    reply
    0
  • Cancelreply