有的时候在首页显示的时候,列表里面只需要字符串,不需要标签,那么就需要删掉html标签。
/**
* 删掉所有的html标签
* @param html
* @returns {XML|void|string}
*/
common.removeAllHtml = function (html) {
return html.replace(/<[^>]+>/g, '');
};
有的时候在首页显示的时候,列表里面只需要字符串,不需要标签,那么就需要删掉html标签。
/**
* 删掉所有的html标签
* @param html
* @returns {XML|void|string}
*/
common.removeAllHtml = function (html) {
return html.replace(/<[^>]+>/g, '');
};