window.onload = function() { var myDiv = document.createElement('div'); myDiv.appendChild(document.createTextNode('Текст')); document.body.appendChild(myDiv); };