I want to add a domain url to an image src without replacing the image name:
Domain Url : http://www.example.com
Before:
<img src="images/old.gif">
After:
<img src="http://www.example.com/images/old.gif">
I have tried using javascript but no luck:
document.getElementById("footer").getElementsByTagName("img")[0].src = "http://www.example.com";
Or, you might try check out the base tag: