JavaScript Check Image Src

if (img.getAttribute('src') === 'on.png')
Luoskate