Use innerHtml to change text of a specific element.
HTML
<div id="container"></div>
javascript
document.getElementById('container').innerHTML += '<div>content</div>';
or you can use jQuery library, life will be much easier:
$("#container").append("<div>content</div>");