var _table = document.getElementById("mytable2"); for(var i=1;i<10;i++){ var row=document.createElement ("tr"); row.id=i; for(var j=1;j<6;j++){ var cell=document.createElement ("td"); cell.id =i+"/"+j; cell.appendChild(document.createTextNode ("第"+cell.id+"列")); row.appendChild (cell); } _table.appendChild (row); }
js写table表
猜你喜欢
转载自www.cnblogs.com/ynhk/p/12029891.html
今日推荐
周排行