时间:2021-07-01 10:21:17 帮助过:35人阅读
/* * 去掉HTML标签 */function stripHTML(oldString) { return oldString.replace(/<\/?[^>]+>/gi, "");}/* * 去掉
*/function stripBR(oldString) { return oldString.replace(//gi, "");}/* * 去掉全角空格和半角空格 */function stripSpace(string) { var tempstr; tempstr = string.replace(/(^\s+)|(\s+$)/g, ""); tempstr = tempstr.replace(/(^ +)|( +$)/g, ""); return tempstr;}