function replaceAll(text, strA, strB)
 {
   while ( text.indexOf(strA) != -1)
   {
     text = text.replace(strA,strB);
   }
  return text;
}

This function will replace all occurrences of strA with strB in text.

Random Posts



Leave a Comment