Pattern match and replace in Javascript
Posted
by T_t
on Stack Overflow
See other posts from Stack Overflow
or by T_t
Published on 2010-03-31T12:21:13Z
Indexed on
2010/03/31
12:23 UTC
Read the original article
Hit count: 138
html
|JavaScript
There is something in my mind: In a web page,there are lots of things we can see from our browser.One of them is text. Now i have some patterns,"abc","hello",or some other strings.In the text, i want to find all the patterns and change the color or background-color of them. Like this: text: what a wonderful day! pattern: "a","day" resulet: what a wonderful day! How can solve this whit Javascript?
© Stack Overflow or respective owner