Is there a jQuery version of this function?
string strip_tags( string $str [,
string $allowable_tags ] )
strip all tags and content inside them from a string except the ones defined in the allowable tags string.
like:
var stripped = strip_tags($('#text').html(), '<p><em><i><b><strong><code>');
from:
<div id="text">
<p> paragraph </p>
<div> should be stripped </div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…