You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1017 B
32 lines
1017 B
1 month ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>积分查看</title>
|
||
|
<link rel="stylesheet" href="style_4.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="background-container">
|
||
|
<div class="firstcontainer">
|
||
|
<div class="getexcel">
|
||
|
<div class="text">
|
||
|
<!-- 这个链接将触发服务器端的 /api/export-students 端点 -->
|
||
|
<a href="http://localhost:3001/api/export-students" download="students.xlsx">导出学生积分数据</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
// 这个函数可以在需要时被调用,例如通过按钮点击事件
|
||
|
function triggerDownload() {
|
||
|
// 使用 window.location.href 来触发下载
|
||
|
window.location.href = 'http://localhost:3001/api/export-students';
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|