All you have to to is store the HTML in a variable as a string, then you can just restore. Check out this fiddle.
var myDiv = document.getElementById('demo');
var myOldHtml = myDiv.innerHTML;
myDiv.innerHTML = '<span>Wow, so HTML</span>';
setTimeout(function () {
myDiv.innerHTML = myOldHtml;
}, 1000);