这里我有示例html,我想解开div中的所有段落标签。目前的html看起来像这样。打开div中的所有段落标签jquery
<div class="divclass">
Hi this is some text.
<p>testing test</p>
<p></p>
<p><a href="#" rel="nofollow">Testing text2</a></p>
</div>
但我想要这样。
<div class="divclass">
Hi this is some text.
testing test
<a href="#" rel="nofollow">Testing text2</a>
</div>
在此先感谢。
http://stackoverflow.com/questions/17271884/jquery-unwrap-div-within-p –
这也可以帮助https://api.jquery.com/unwrap/ –