📌  相关文章
📜  在javascript代码示例中动态创建标签

📅  最后修改于: 2022-03-11 15:04:08.983000             🧑  作者: Mango

代码示例1
var newlabel = document.createElement("Label");
newlabel.setAttribute("for",id_from_input);
newlabel.innerHTML = "Here goes the text";
parentDiv.appendChild(newlabel);