I am trying to make something, where, if you input your minecraft username, you get your profile icon.
What have I done wrong?
Here is my code.
var username = document.getElementById("username").value;
var url = "http://www.minotar.net/avatar/" + username + "/150";
<img id="usernamepicture" src="">
<p>Your Minecraft Username</p>
<input type="text" id="username">
Set you button type to
<button onclick="usernameget()" type="button">Go!</button>
This will stop it from submitting your
See this fiddle: http://jsfiddle.net/512p1L89/
However I think the better solution would be to remove the form tag unless you do require the user to later submit the form back to the server.