my textarea is
var tex = document.createElement("TEXTAREA");
document.body.appendChild(tex);
how can I add class and id to the textarea or areas?
my textarea is
var tex = document.createElement("TEXTAREA");
document.body.appendChild(tex);
how can I add class and id to the textarea or areas?
var tex = document.createElement("TEXTAREA");
tex.setAttribute("class", "democlass");
tex.setAttribute("id", "demoId");
document.body.appendChild(tex);
for reference https://www.w3schools.com/jsref/met_element_setattribute.asp