I’m using AJAX to append data to a <div> element, where I fill the <div> from JavaScript. How can I append new data to the <div> without losing the previous data found in it?

11 Answers
11

Try this:

var div = document.getElementById('divID');

div.innerHTML += 'Extra stuff';

Leave a Reply

Your email address will not be published. Required fields are marked *