日期:2014-05-16 浏览次数:20386 次
var html = "";
for(*****){
html += "<tr><td></td><td></td><td></td><tr>"
}
table.innerHTML = html;
var _table = document.createElement('table');
var title = _table.createCaption();
title.innerHTML = "<div style=' font-size:20px'><b>表头</b></div>";
_table.appendChild(title);
var _tbody = document.createElement('tbody');
_table.appendChild(_tbody);
var num = 0;
for (var i = 0; i < 5; i++) { //五行十列
_row = document.createElement("tr");
_tbody.appendChild(_row);
var td;
var sign = 0;
for (var j = 0; j < 10; j++) {
if (j == 0) { //第一列为编号
num++;
_cell = document.createElement("td");
_cell.innerHTML = num;
_row.appendChild(_cell);
}
else {
if (j == 1) {
_cell = document.createElement("td");
&nbs