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?

滿天的星座滿天的星座2604 days ago510

reply all(1)I'll reply

  • 習慣沉默

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

    在源代码中:view-source:http://www.shindengen.co.jp/t...
    并没有看到dl.clearfix 元素,你为什么要给它加个.clearfix这个选择器?

    Reply
    0
  • CancelReply