Answers for "how to create an element using javascript in html"

12

js create element

var newDiv = document.createElement("div");
document.body.appendChild(newDiv);
Posted by: Guest on April-04-2020
0

js create tag

//create div
let div = document.createElement('div');
//create button
let button = document.createElement('button');
Posted by: Guest on January-05-2021

Code answers related to "how to create an element using javascript in html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language