4
Good night! I have a login input and an img with the user image. I am trying to change the user image when this input loses focus and if the entered value corresponds to a given value. ex: if I type in this Potato input I will change the src pointing to my potato.png image instead of no-user.png.
<img id="img" src="images/no-user.png" alt="Sem usuário">
<input name="Login" type="text" placeholder="Login" maxlength="20" onblur="carregarFoto(this.value)">
Could someone give me an example?