File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change
1
+ function showMessage ( ) {
2
+ document . getElementById ( "msg" ) . innerText = "你点击了按钮!" ;
3
+ }
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments