Closed newtome8888 closed 6 months ago
Instead of using the short-hand for classes, directly select for the class attribute, e.g.
div[class^='id_']
div[class*='a']
See https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors for details.
Suppose there is a html fragment:
<frag>
<div class="a"></div>
<div class="id_1"></div>
<div class="id_2"></div>
<div class="id_3"></div>
<span class="aaa"></span>
<span class="bbb"></span>
</frag>
Qustion: 1.How to select all the nodes with class name have prefix "id_"? 2.How to select all the nodes with class name contains character "a"?