function add(){
var table=document.createElement("table");
table.setAttribute("border","1px");
table.setAttribute("border","solid");
table.setAttribute("borderColor","blue");
table.setAttribute("bgcolor","#3399FF");
table.setAttribute("width","500px");
table.setAttribute("height","200px");
var lie=document.getElementById("lie").value;
var hang=document.getElementById("hang").value;
for(var i=0;i
var tr=document.createElement("tr");
for(var j=0;j
var td=document.createElement("td");
tr.appendChild(td);
table.appendChild(tr);
}
}
div1.appendChild(table);
}
行数:
列数: