HTML JavaScript DHTML







var pTag = document.createElement("p");
pTag.setAttribute("id","myP");
document.body.appendChild(pTag);
pTag.appendChild(document.createTextNode("This is a paragraph."));
var hyperLinkTag = document.createElement("a");
hyperLinkTag.setAttribute("id","myA");
hyperLinkTag.setAttribute("href","http://www.google.org/");
document.body.appendChild(hyperLinkTag);
hyperLinkTag.appendChild(document.createTextNode("Web Site."));