how to check img src in js code example Example: javascript check image src if (img.getAttribute('src') === 'on.png')