The JavaScript function for String Replace replaces the first occurrence in the string. The function is similar to the php function str_replace and takes two simple parameters. The first parameter is the pattern to find and the second parameter is the string to replace the pattern with when found. The javascript function does not Replace All...
str = str.replace(”find”,”replace”)
To ReplaceAll you have to do it a little differently. To replace all occurrences in the string, use the g modifier like this:
str = str.replace(/find/g,”replace”)

Hi,
ReplyDeleteTruely Helpful ...Thanks a lot
Great article. Thanks for sharing.
ReplyDeleteweb design hyderabad
Awesome information.
ReplyDeleteThank you so much.
sap hybris online training in usa
hadoop online training in usa
online training in usa
sap fico online training in usa
Wow, nice article. Thanks for sharing.
ReplyDeletesap fico online training in usa
hadoop online training in usa
sap hana online training in usa