Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -4,32 +4,32 @@
|
|||
Node.prototype.a = function (e) { this.appendChild(e); return this }
|
||||
|
||||
function ce(tag, txt) {
|
||||
var x = document.createElement(tag);
|
||||
x.textContent = (txt === undefined) ? '' : txt;
|
||||
return x;
|
||||
var x = document.createElement(tag);
|
||||
x.textContent = (txt === undefined) ? '' : txt;
|
||||
return x;
|
||||
}
|
||||
|
||||
function make_table(cols, rows) {
|
||||
var tbl = ce('table', ''), tr = ce('tr'), th;
|
||||
var tbl = ce('table', ''), tr = ce('tr'), th;
|
||||
|
||||
tbl.a(tr.a(ce('th')));
|
||||
tbl.a(tr.a(ce('th')));
|
||||
|
||||
var z = 'Z'.charCodeAt(0);
|
||||
for (var l = z - cols + 1; l <= z; l++)
|
||||
tr.a(ce('th', String.fromCharCode(l)));
|
||||
var z = 'Z'.charCodeAt(0);
|
||||
for (var l = z - cols + 1; l <= z; l++)
|
||||
tr.a(ce('th', String.fromCharCode(l)));
|
||||
|
||||
for (var r = 1; r <= rows; r++) {
|
||||
tbl.a(tr = ce('tr').a(ce('th', r)));
|
||||
for (var c = 0; c < cols; c++)
|
||||
tr.a(ce('td', Math.floor(Math.random() * 10000)));
|
||||
}
|
||||
for (var r = 1; r <= rows; r++) {
|
||||
tbl.a(tr = ce('tr').a(ce('th', r)));
|
||||
for (var c = 0; c < cols; c++)
|
||||
tr.a(ce('td', Math.floor(Math.random() * 10000)));
|
||||
}
|
||||
|
||||
document.body
|
||||
.a(ce('style',
|
||||
'td, th {border: 1px solid #696;' +
|
||||
'padding:.4ex} td {text-align: right }' +
|
||||
'table { border-collapse: collapse}'))
|
||||
.a(tbl);
|
||||
document.body
|
||||
.a(ce('style',
|
||||
'td, th {border: 1px solid #696;' +
|
||||
'padding:.4ex} td {text-align: right }' +
|
||||
'table { border-collapse: collapse}'))
|
||||
.a(tbl);
|
||||
}
|
||||
</script></head>
|
||||
<body><script>make_table(5, 4)</script></body></html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue