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
Try this:
var div = document.getElementById('divID');
div.innerHTML += 'Extra stuff';