Change image source with JavaScript December 2, 2023 by Tarik function changeImage(a) so there is no such thing as a.src => just use a. demo here