-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
29 lines (26 loc) · 822 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
var table = document.createElement('table');
for (var i = 1; i < 10; i++) {
var row = table.insertRow();
for (var j = i; j < 10; j++) {
console.log(i + '*' + j + '=' + i * j);
var cell = row.insertCell();
cell.innerText=i + '*' + j + '=' + i * j + '';
cell.style.width =100+'px';
cell.style.border = '1px solid red';
}
console.log('\n');
}
document.body.appendChild(table);
</script>
</body>
</html>