-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (54 loc) · 1.34 KB
/
Copy pathindex.html
File metadata and controls
61 lines (54 loc) · 1.34 KB
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
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<title>Download Page</title>
<style>
body {
font-family: Arial;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f2f2f2;
}
.box {
text-align: center;
padding: 30px;
background: white;
border-radius: 12px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
button {
padding: 12px 20px;
font-size: 16px;
border: none;
background: #007bff;
color: white;
border-radius: 8px;
cursor: pointer;
}
button:hover {
background: #0056b3;
}
</style>
</head>
<body>
<div class="box">
<h2>Tải file</h2>
<button onclick="downloadFile()">Download</button>
</div>
<script>
function downloadFile() {
// file nằm cùng repo với index.html
const fileUrl = "./ssms.zip"; // đổi tên file ở đây
const a = document.createElement("a");
a.href = fileUrl;
a.download = ".zip"; // tên khi tải về
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
</script>
</body>
</html>