-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoniter Response.html
More file actions
48 lines (43 loc) · 1.12 KB
/
Copy pathMoniter Response.html
File metadata and controls
48 lines (43 loc) · 1.12 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<body>
<table>
</table>
</body>
<style>
tr, td{
width: 1px;
height: 1px;
border: 0px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
function checkerboard(size){
let body = document.querySelector('body');
let tab = document.createElement('table');
for(let i = 0; i < size; i++){
let row = document.createElement('tr');
for(let k = 0; k < size; k++){
let temp = i+k;
//console.log(temp&1)
if((temp & 1) == 1){
let cell = document.createElement('td')
cell.style.background = 'rgb(100,100,100)';
row.appendChild(cell);
}
else{
let cell = document.createElement('td')
cell.style.background = 'rgb(0,0,0)';
row.appendChild(cell);
}
}
tab.appendChild(row);
}
body.appendChild(tab);
//return str;
}
function addDiv(width, height){
jQuery('body').append('<div style="width:' + width + ', height:' + height + '"></div>');
}
checkerboard(100);
//document.querySelector('table').append(str);
</script>