replace all occurences of a string in variable javascript
by Ramshan[ Edit ] 2014-10-18 17:43:00
to replace all the occurence of a string, just use javascript replace function as,
strname.replace(/rep/g, 'with');
if you want to replace all the occurences of a string in a variable use javascript REGEX concetp,
strname.replace(new RegExp(repVar,"g"), repwith)