SyntaxFix
Write A Post
Hire A Developer
Questions
here's a pure Javascript alternative:
var mydiv = document.getElementById("myDiv"); var aTag = document.createElement('a'); aTag.setAttribute('href',"yourlink.htm"); aTag.innerText = "link text"; mydiv.appendChild(aTag);