Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js change div content

let element = document.getElementById("test");
let newContent =`
	<h1>New Title</h1>
	<p>New Content</p>
`;

//changing the content in your element
element.innerHTML = newContent;
 
PREVIOUS NEXT
Tagged: #js #change #div #content
ADD COMMENT
Topic
Name
6+2 =