-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (59 loc) · 1.58 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>星涵煦的网站</title>
<style>
body {
background-color: #444;
font-size: 14px;
}
h3 {
font-size: 60px;
color: #eee;
text-align: center;
padding-top: 30px;
font-weight: normal;
}
.btn {
display: inline-block;
background-color: #007bff;
color: #fff;
text-decoration: none;
padding: 10px 20px;
border-radius: 5px;
margin: 0 10px;
cursor: pointer;
}
.btn:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h3>星涵煦</h3>
<h2>这是星涵煦的一个小小的网站</h2>
<h2></h2>
<div id="buttonContainer"></div>
<script>
// 通过 JavaScript 动态创建超链接按钮
var buttonContainer = document.getElementById("buttonContainer");
// 预设超链接按钮的数据
var buttonsData = [
{ text: "点击查看服务器IP和端口", url: "./1.html" },
{ text: "点击下载服务器地图备份", url: "6" },
{ text: "按钮3", url: "6" },
// 添加更多按钮数据...
];
// 循环创建按钮并添加到页面中
buttonsData.forEach(function(buttonData, index) {
var button = document.createElement("a");
button.textContent = buttonData.text;
button.href = buttonData.url;
button.classList.add("btn");
buttonContainer.appendChild(button);
});
</script>
</body>
</html>