【发布时间】:2022-01-19 07:41:06
【问题描述】:
"<p><span style="color: rgb(255, 255, 255);">Beautifully hand designed brochure with arresting imagery created by the designers</span><em style="color: rgb(255, 255, 255);"> eminem.</em></p>"
"<p><span style="color: rgb(105,105,105);">Beautifully hand designed brochure with arresting imagery created by the designers</span><em style="color: rgb(255, 255, 255);"> eminem.</em></p>"
我想通过编写脚本来更改 rgb 颜色 (128,128,128)。请帮我解决这个问题
【问题讨论】:
-
但是你不需要正则表达式来改变颜色,你可以用 .css('color', new_color) 改变元素的颜色。由于某种原因,您需要正则表达式吗?
-
因为我需要替换所有出现的特定字符串。如果还有其他方法。请告诉我
标签: javascript regex regexp-replace