I have a script that creates a list of items with a structure like this:
<li>
<div>Some stuff</div>
<a href="http://www.mysite.com/">New Item</a>
(1 vote)
</li>
I was wondering if there was a way to remove everything outside the <div>
and <a>
tags, in this case the (1 vote) string, with jQuery or regular javascript.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…