Quantcast
Channel: User FoxInFlame - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Getting Minecraft Images

$
0
0

I am trying to make something, where, if you input your minecraft username, you get your profile icon.

I found this website Minotar, where you could get icons by the url. So, I tried making a JavaScript script out of it, and display it. But, the picture doesn't want to show up when I click "Go!".

What have I done wrong?

Here is my code.

<script>function usernameget(){  var username = document.getElementById("username").value;  var url = "http://www.minotar.net/avatar/"+ username +"/150";  document.getElementById("usernamepicture").setAttribute("src", url);}</script><form><img id="usernamepicture" src=""><p>Your Minecraft Username</p><input type="text" id="username"><button onclick="usernameget()">Go!</button></form>

Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>