var data = []; var str = []; this.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, function (match, capture) { data.push(capture); str.push(match); }); console.log(data); console.log(str);
js使用正则表达式匹配富文本框中的img标签
猜你喜欢
转载自www.cnblogs.com/tlfe/p/12786527.html
今日推荐
周排行