Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

js查找下一个字符串

需求是:需要获取字符串里面包含的所有指定字符串,并高亮显示。
点击按钮时。切换选中下一个字符串。
切换按钮时。之前高亮的需要清除。替换成新的内容并高亮。
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

老哥 你怎么又来了 正则表达式 g全局替换就行了
data
image.png
computed
image.png
html
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...