JavaScript实现动态添加Html控件

function Dom()
        {
            var textControl=document.createElement("input");
            textControl.setAttribute("type","text");
            textControl.setAttribute("name","txtDom");
            textControl.setAttribute("runat","server");
            document.getElementById("Show").appendChild(textControl);
        }
原文地址:https://www.cnblogs.com/lilyzhang/p/1585086.html