var html = xhr.responseText; var div = document.createElement('div'); div.innerHTML = html; document.body.appendChild(div.firstChild);