js check if img src is url code example Example: javascript check image src if (img.getAttribute('src') === 'on.png')