var body = "<img style='adfs' class='container'>test</img></b>";
var result = body.replace(/img/gi,'like');
console.log(result);//<like style='adfs' class='container'>test</like></b>
js方法加正则 替换标签
猜你喜欢
转载自blog.csdn.net/weixin_51426266/article/details/127413096
今日推荐
周排行