I have a form for a registration page. The form contains an image that changes its src dependant on a situation. Within a script which activates upon submission of the form
Use this:
if (document.getElementById('FName_Status').getAttribute('src') == "pictures/apic.png")