-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
72 lines (63 loc) · 3.29 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/neooblaster/TableJs@main/releases/v0.1.6.min.js"></script>-->
<script type="text/javascript" src="bin/TableJs.js"></script>
</head>
<body>
<script>
let aObject = [
{'Brand': 'Nikon', 'Camera': 'D3', 'Date': '2007', 'Format': 'Full Frame', 'Purpose': 'Professional'},
{'Brand': 'Nikon', 'Camera': 'D750', 'Date': '2014', 'Format': 'Full Frame', 'Purpose': 'Action'},
{'Brand': 'Nikon', 'Camera': 'D800', 'Date': '2011', 'Format': 'Full Frame', 'Purpose': 'Semi-Professional'},
{'Brand': 'Nikon', 'Camera': 'D810A', 'Date': '2015', 'Format': 'Full Frame', 'Purpose': 'Astro'},
{'Brand': 'Nikon', 'Camera': 'D7100', 'Date': '2013', 'Format': 'APS-C', 'Purpose': 'Expert'},
{'Brand': 'Nikon', 'Camera': 'D6', 'Date': '2020', 'Format': 'Full Frame', 'Purpose': 'Professional'},
{'Brand': 'Canon', 'Camera': '1Ds Mark III', 'Date': '2007', 'Format': 'Full Frame', 'Purpose': 'Professional'},
{'Brand': 'Canon', 'Camera': '5D Mark II', 'Date': '2008', 'Format': 'Full Frame', 'Purpose': 'Semi-Professional'},
{'Brand': 'Canon', 'Camera': '60Da', 'Date': '2012', 'Format': 'APS-C', 'Purpose': 'Astro'},
{'Brand': 'Canon', 'Camera': '250D', 'Date': '2019', 'Format': 'APS-C', 'Purpose': 'Compact'}
];
let aArray = [
[ 'Nikon', 'D3', '2007', 'Full Frame', 'Professional' ],
[ 'Nikon', 'D750', '2014', 'Full Frame', 'Action' ],
[ 'Nikon', 'D800', '2011', 'Full Frame', 'Semi-Professional' ],
[ 'Nikon', 'D810A', '2015', 'Full Frame', 'Astro' ],
[ 'Nikon', 'D7100', '2013', 'APS-C', 'Expert' ],
[ 'Nikon', 'D6', '2020', 'Full Frame', 'Professional' ],
[ 'Canon', '1Ds Mark III', '2007', 'Full Frame', 'Professional' ],
[ 'Canon', '5D Mark II', '2008', 'Full Frame', 'Semi-Professional' ],
[ 'Canon', '60Da', '2012', 'APS-C', 'Astro' ],
[ 'Canon', '250D', '2019', 'APS-C', 'Compact' ],
];
let aTableJsObj = new TableJs(
// List of Fields (At least one required)
// ['Brand', 'Camera', 'Date', 'Format', 'Purpose'],
['Brand', 'Camera', 'Date', 'Format'],
// Indicating that fields compose the key
// -> Optional, but at least empty Array must be passed
['Camera', 'Brand'],
aObject
);
// --> OK, auto bound for Array of Array
// let aTableJsArr = new TableJs(
// // List of Fields (At least one required)
// ['Brand', 'Camera', 'Date', 'Format', 'Purpose'],
//
// // Indicating that fields compose the key
// // -> Optional, but at least empty Array must be passed
// ['Camera', 'Brand'],
//
// aArray
// );
function run(){
aTableJsObj.fields().add('Purpose');
}
</script>
</body>
</html>