-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.html
51 lines (43 loc) · 1.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HtmlGenerator</title>
<script src="htmlGenerator.js"></script>
</head>
<body>
<script>
new HtmlGenerator([
{
tag: "div",
att: { class: "class-name-1", id: "id-1", hidden: "true" },
val: "Value 1",
childs: [
{ tag: "h1", att: { class: "class-name-1.1" }, val: "Text here..." }
]
},
{
tag: "div",
val: "Value 2",
att: { class: "class-name-2" },
childs: [
{
tag: "div",
att: { class: "class-name-2.1", id: "id-2.1" },
val: "Value 2.1",
childs: [
{ tag: "div", att: { class: "class-name-2-1-1" }, val: "Value 2.1.1" }
]
},
]
},
{
tag: "div",
att: { class: "class-name-3" },
val: "Value 3"
}
], document.body)
</script>
</body>
</html>