innerhtml none code example
Example 1: javascript create node from innerhtml
function createElement( str ) {
var frag = document.createDocumentFragment();
var elem = document.createElement('div');
elem.innerHTML = str;
while (elem.childNodes[0]) {
frag.appendChild(elem.childNodes[0]);
}
return frag;
}
Example 2: innerHTML
document.getElementById("Test").innerHTML = "<h1>Test</h1>";