JavaScript实现动态添加Html控件
2009-10-17 15:51 floweriness 阅读(304) 评论(0) 编辑 收藏 举报
function Dom()
{
var textControl=document.createElement("input");
textControl.setAttribute("type","text");
textControl.setAttribute("name","txtDom");
textControl.setAttribute("runat","server");
document.getElementById("Show").appendChild(textControl);
}
{
var textControl=document.createElement("input");
textControl.setAttribute("type","text");
textControl.setAttribute("name","txtDom");
textControl.setAttribute("runat","server");
document.getElementById("Show").appendChild(textControl);
}