document.getElementById("myImg").src = "hackanm.gif";
<a href='#' onclick='edit()'><img src="../template/edit.png" id="edit-save"/></a>