replace all occurrence of a string javascript

by Ramya 2010-11-04 16:22:55

Replace all occurrence of a string javascript:

To Replace all occurrence of a string javascript, use regular expression with javascript as,
var brr = str.replace(/<br>/g, "");


Here i have replaced all occurrence of <br> with empty string.

Tagged in:

1274
like
0
dislike
0
mail
flag

You must LOGIN to add comments