JavaScript 移除 HTML 标签并转义双引号
可以使用转义符号来转义双引号,例如:
let str = 'dit me may '; str = str.replace(/<[^>]+>/ig,""); console.log(str);
输出结果为:dit me may
原文地址: https://www.cveoy.top/t/topic/loJN 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
可以使用转义符号来转义双引号,例如:
let str = 'dit me may '; str = str.replace(/<[^>]+>/ig,""); console.log(str);
输出结果为:dit me may
原文地址: https://www.cveoy.top/t/topic/loJN 著作权归作者所有。请勿转载和采集!