--不好意思,代码忘记粘贴了下面是代码
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);
相关分类