View Full Version : JS replace function help


trepxe-oes
12-04-2007, 10:04 PM
Hello friends,

I want to use replace function in javascript but the client wants that a particular word should be replaced a specified number of times. For example...

In a particular page, I want to replace first 5 occurances of the word 'Telecom' to 'Telecommunications'. No matter how many times this word is used in the specified page.

Please help