mercredi 24 novembre 2021

compare id of an image in the html doc to a string using javascript

Im trying to compare an IMG ID to a String but nothing is working for me...

example:

if(img.id === "testID"){
       alert("ok");
   }
    else alert("not ok");
}

thanks ;)




Aucun commentaire:

Enregistrer un commentaire