Click to See Complete Forum and Search --> : replace in javascript


rajhoo
04-02-2003, 03:01 AM
Hi,

Does somebody know how i can replace characters in a string using javascript?

I know a replace function in vbscript that would work fine, but it would be better this time that i replaced the chars in jscript.

Thanks in advance!

gil davis
04-02-2003, 06:09 AM
Not directly. You would have to split the string using the substr() function and then concatenate the parts back together with the changes.