<script type="text/javascript">
    document.getElementById('logo_img').src = "/my-folder/my-image.png";
    document.getElementById('logo_img').title = "My Title";
    document.getElementById('logo_img').alt = "My Alt";
  </script>

If you need to stop the image beign changed by a later script you can add this:

document.getElementById('logo_img').id = "new_logo_img";    <!--Change ID to stop it beign modified by anything else-->
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *