I have many images from 1 to 33, letters of russian alphabet and I want with one command become lowercase(/image2/XX.png) from uppercase(/images/XX.png) ... I tried but meet rather concenation...
Code:
<tr>
<td id="cell61"><img src="images/30.png" alt="30" height="69" width="69" id="p30" /></td>
<td id="cell62"><img src="images/31.png" alt="31" height="69" width="69" id="p31" /></td>
<td id="cell63"><img src="images/32.png" alt="32" height="69" width="69" id="p32" /></td>
<td id="cell64"><img src="images/33.png" alt="33" height="69" width="69" id="p33" /></td>
function lower() {
for (var i=0; i<33; i++) { // replace images/ with image2/ // folder is, img names are the same
var j=i+1
var xsrc=document.getElementById("p"+j).src;
var newsrc=xsrc.replace(xsrc.slice(-13,6), "image2");
document.getElementById("p"+j).src=newsrc;
}
alert(newsrc);
}
Bookmarks