-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
105 lines (94 loc) · 1.95 KB
/
index.js
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
const data = [
{
id: 1,
url: "./img/LoiChua/LocThanh/LC01.png"
},
{
id: 2,
url: "./img/LoiChua/LocThanh/LC02.png"
},
{
id: 3,
url: "./img/LoiChua/LocThanh/LC03.png"
},
{
id: 4,
url: "./img/LoiChua/LocThanh/LC04.png"
},
{
id: 5,
url: "./img/LoiChua/LocThanh/LC05.png"
},
{
id: 6,
url: "./img/LoiChua/LocThanh/LC06.png"
},
{
id: 7,
url: "./img/LoiChua/LocThanh/LC07.png"
},
{
id: 8,
url: "./img/LoiChua/LocThanh/LC08.png"
},
{
id: 9,
url: "./img/LoiChua/LocThanh/LC09.png"
},
{
id: 10,
url: "./img/LoiChua/LocThanh/LC10.png"
},
{
id: 11,
url: "./img/LoiChua/LocThanh/LC11.png"
},
{
id: 12,
url: "./img/LoiChua/LocThanh/LC12.png"
},
{
id: 13,
url: "./img/LoiChua/LocThanh/LC13.png"
},
{
id: 14,
url: "./img/LoiChua/LocThanh/LC14.png"
},
{
id: 15,
url: "./img/LoiChua/LocThanh/LC15.png"
},
{
id: 16,
url: "./img/LoiChua/LocThanh/LC16.png"
},
{
id: 17,
url: "./img/LoiChua/LocThanh/LC17.png"
},
{
id: 18,
url: "./img/LoiChua/LocThanh/LC18.png"
},
{
id: 19,
url: "./img/LoiChua/LocThanh/LC19.png"
},
{
id: 20,
url: "./img/LoiChua/LocThanh/LC20.png"
},
];
function random () {
let random = Math.floor(Math.random() * 20);
const img = document.createElement("img");
const a = document.querySelector("a");
a.href = data[random].url;
img.src = data[random].url;
img.classList.add("img-loichua-item");
a.appendChild(img);
// document.body.appendChild(a);
document.querySelector(".container").style.display = "none";
}
var button = document.getElementsByClassName("btn");