snipplets.dev/JavaScript/addElements.js

4 lines
137 B
JavaScript
Raw Normal View History

2022-03-26 03:37:19 +03:00
let newDiv = document.createElement('div');
newDiv.appendChild(document.createTextNode('some text'));
document.body.appendChild(newDiv);