Js过滤HTML,只保留文本

//过滤HTML

function FilterStr(str) {

var re = /<[^>]+>/gi;

str = str.replace(re, '');

return str;

}