var maincontent = document.getElementById("content").innerHTML;
maincontent = "<p>" + first;
On the second line you're overwriting the variable, not setting the
.innerHTML
. This is what you want:var maincontent = document.getElementById("content");
maincontent.innerHTML = "<p>" + first;
No comments:
Post a Comment