I want to create new divs as the page loads. These divs will appear as an ordered group which changes depending upon external data from a JSON file. I will need to do this w
var div = document.createElement('div');document.body.appendChild(div);div.style.left = '32px'; div.style.top = '-16px';div.className = 'ui-modal';div.id = 'test';div.innerHTML = 'Hello world.';div.textContent = 'Hello world.';div.parentNode.removeChild(div);div = document.getElementById('test');array = document.getElementsByTagName('div');array = document.getElementsByClassName('ui-modal');div = document.querySelector('div #test .ui-modal');array = document.querySelectorAll('div');node = div.childNodes[i];node = div.nextSibling;element = div.children[i];element = div.nextElementSibling;This covers the basics of DOM manipulation. Remember, element addition to the body or a body-contained node is required for the newly created node to be visible within the document.