Skip to content

Commit 4c1a24a

Browse files
committed
new website created
1 parent 8930b28 commit 4c1a24a

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

frontend/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="zh">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>我的网站</title>
7+
<link rel="stylesheet" href="styles.css">
8+
</head>
9+
<body>
10+
<h1>欢迎访问我的网站</h1>
11+
<button onclick="showMessage()">点我</button>
12+
<p id="msg"></p>
13+
14+
<script src="script.js"></script>
15+
</body>
16+
</html>

frontend/script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function showMessage() {
2+
document.getElementById("msg").innerText = "你点击了按钮!";
3+
}

frontend/styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
body {
2+
text-align: center;
3+
font-family: Arial, sans-serif;
4+
background-color: #f0f0f0;
5+
}
6+
7+
h1 {
8+
color: #333;
9+
}
10+
11+
button {
12+
padding: 10px 20px;
13+
font-size: 16px;
14+
cursor: pointer;
15+
}

0 commit comments

Comments
 (0)