//With the help of a little JQuery
If you are using the Image Asp.net server control, you should use:
var url = $("#<%=ImgCtrl.ClientID%>").attr("src");
Assuming the Image control's ID is ImgCtrl
Or, if the image is simply an HTML element,
var url = $("#imgid").attr("src");
Assuming the id of the image is "imgid"