lundi 21 décembre 2015

If statement javascript doesnt work

My if statement dont work. can someone help me by telling howe to check if my a.style.background is equal to my url open.png? i have the next code.

if(a.style.backgroundImage == "url(open.png)"){
        alert("help");
        a.style.backgroundImage="url(navopen.png)";
}

Sorry for my bad english:)

Aucun commentaire:

Enregistrer un commentaire