我的HTML页面中有多个.text-excerpt
实例,我想知道如何从每个元素实例中删除所有标记。
HTML:
<span class="text-excerpt">
<p>Lorem ipsum dolor sit <strong>amet</strong>, consectetur adipiscing <br>elit. Aenean eget.</p>
</span>
<span class="text-excerpt">
<p>Lorem ipsum dolor sit <strong>amet</strong>, consectetur adipiscing <br>elit. Aenean eget.</p>
</span>
<span class="text-excerpt">
<p>Lorem ipsum dolor sit <strong>amet</strong>, consectetur adipiscing <br>elit. Aenean eget.</p>
</span>
答案 0 :(得分:3)