去掉所有的标签

function delHtmlTag(str)
{
return str.replace(/<[^>]+>/g,"");//去掉所有的html标记
}

 $(".positionDesc").each(function (i) {
var positionDesc=$(this).text();
$(this).text(delHtmlTag(positionDesc));
});
原文地址:https://www.cnblogs.com/austinspark-jessylu/p/7873445.html