I keep receiving the result "undefined":
Here is my JavaScript code:
document.getElementById("myImg").src = "hackanm"+x+".gif";
var x = document.getElementsByTagName("img")[0].getAttribute("data");
This is my HTML code:
<img data="WhatIWantToAdd" id="myImg" src="" >