0
Why do we use ev.target.appendChild(document getElementbyId(data));
2 ответов
+ 1
Where did you see this statement?
after getElementById(data), there should be .innerText
0
//The method appendChild places a newly created element created with document.createElement inside of a parent. Use:
var x = document.createElement(“div”);
x.setAttribute(“id”,”abc”);
x.classList.add(“aDiv”);
document.body.appendChild(x);
//This places the created div element inside of the body (I also gave it an id of abc and added the class aDiv).
//Edit: ev is probably an object and target is a selector for an argument.