parent
7f7a2e6e4b
commit
03c6d1b6eb
@ -0,0 +1,32 @@
|
|||||||
|
<!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>
|
Loading…
Reference in new issue