0 works

Add Code to HTML by Manipulating the DOM

dashboard+ Project

Posted by @mishka #html #javascript

const randomElement = document.getElementById('someElement');
randomElement.innerHTML = '<p>changing the DOM</p>'
content_copyCopy to Clipboard

The Document Object Model (DOM) is a representation of HTML that can be changed and manipulated with code. For us, that means we'll be able to write JavaScript code that dynamically changes our HTML in the browser.


>> Browse more code snippets