1

次のスニペットでは、クラス属性のない <b> タグの最初のオカレンスを取得したいと考えています。

<html>
<body>
     <p>This is the <b class="abc">text in bold with a class attribute</b> and the following is <b> text in bold without a class attribute</b>
</body>
</html>   

ポインタはありますか?

4

1 に答える 1

7

それは次のようになります:

doc.at('b:not([class])')
于 2013-02-20T13:06:07.647 に答える