Howdy
how do I replace the a with a b in the image name and assign it to j ?
if i = "../../images/01a.jpg"
Thanks in advance
Printable View
Howdy
how do I replace the a with a b in the image name and assign it to j ?
if i = "../../images/01a.jpg"
Thanks in advance
Code:var original = "../../images/01a.jpg", j;
var replaceValue = "b";
if(original.indexOf("a.") !== -1){
var j = original.split("a.")[0] + replaceValue + "." + original.split("a.")[1];
}
alert(j)
Thanks bud ;o))