JSFiddle - React, Tailwind, and code Playground

by snake

JavaScript

var link = document.createElement("a");
//link.appendChild(document.createTextNode("Anchor"));
link.href = "http://stackoverflow.com/questions/7932759/dom-appendchild-to-insert-images/7932803";
link.alt = "Flash and JS are not enemies!";


var img = document.createElement("img");
img.src = "http://www.bytearray.org/fplayer.png";
link.appendChild(img);

document.body.appendChild(link);