遍历列表时如何获取之前的 h3 内容?
var statusLabel= $("ul li:contains('Status: MyStatus')");
for(i = 0; i < statusLabel.length; i++) {
// How to i get the previous h3 content of each statusLabel
}
示例 html 层次结构:
<a>
<h3>ToBeExtracted</h3>
<div class="description">
</div>
<ul>
<li>Status: My status</li>
</ul>
慕田峪7331174
相关分类