Answers for "how to make an element in js"

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 make an element in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language