问题:为什么第一句语法过滤不掉pre标签呢?--不好意思,代码忘记粘贴了下面是代码t = '<pre>'t = t.replace(/<(?!img|p(?!re)|\/p(?!re)|u(?!l)|\/u|em|\/em|b(?!utton|ody)|\/b(?!utton|ody)|div|\/div|strong|\/strong|video|\/video|hr|pre|table|\/table|tr|\/tr|td|\/td|thead|\/head|tbody|\/tbody|th|\/th).*?>/ig,'');
console.log(t);t = '<pre>'t = t.replace(/<(?!p(?!re)).*?>/ig,'');console.log(t);
添加回答
举报
0/150
提交
取消