Using Javascript, is there a standard way to get the absolute path of an image? img.getAttribute(\"src\") only returns the src attribu
img.getAttribute(\"src\")
src
Just do .src.
.src
$('img')[0].src = '/images/foo.gif' "/images/foo.gif" $('img')[0].src "http://stackoverflow.com/images/foo.gif" $('img')[0].getAttribute('src') "/images/foo.gif"