-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
37 lines (35 loc) · 1.11 KB
/
index.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
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Banner</title>
<link rel="stylesheet" href="./index.css" />
<link rel="stylesheet" href="./normalize.css" />
</head>
<body>
<div id="app">loading...</div>
<br /><br />
<div id="selectBox"></div>
<br /><br />
</body>
<script type="module">
import barnersData from "./config.js";
const selectBox = document.getElementById("selectBox");
for (let i = 0; i < barnersData.length; i++) {
const element = barnersData[i];
const btn = document.createElement("button");
btn.id = i;
btn.innerText = barnersData[i].name;
selectBox.appendChild(btn);
}
</script>
<script type="module" src="./index.js"></script>
<!-- <script>
const scriptSrc = `./index.js?r=${Math.floor(Math.random() * 100)}`;
const scriptElement = document.createElement("script");
scriptElement.type = "module";
scriptElement.src = scriptSrc;
document.body.appendChild(scriptElement);
</script> -->
</html>