Dynamic Additions of DOM Elements, using JavaScript
I am trying to add an anchor element, dynamically, to a webpage that I am making, and I want to do so, using JavaScript — no JQuery at all. The associated code that I used in my attempt to add the aforementioned element was:
var test= document.createElement("a");
test.href="#";
test.appendChild("link");
I tested the above code in IE11, and it "threw" me an error: HierarchyRequestError. How can I fix this issue?