Good evening! I have a login input and an img with the user image. I'm trying to change the user's image when this input loses focus and the value entered matches a given value. ex: if I type in this input Potato I will change the src pointing to my image potato.png 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?