File tree Expand file tree Collapse file tree
Example/01 Lecture_Example/Basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > Document</ title >
7+
8+ < style >
9+ ul {
10+ list-style-type : none;
11+ }
12+ li {
13+ border : solid 1px black;
14+ padding : 20px ;
15+ margin : 5px ;
16+ background-color : lightblue;
17+ border-radius : 100px ;
18+ float : left;
19+ }
20+ </ style >
21+
22+
23+ < script >
24+
25+ //for (let i = 0; i <= 10; i++) {
26+ // console.log(i);
27+ //}
28+
29+ function clickme ( ) {
30+ for ( let i = 0 ; i <= 100 ; i ++ ) {
31+
32+
33+ document . getElementById ( "print" ) . innerHTML += "<li>" + i + "</li>" ;
34+
35+ }
36+
37+ }
38+
39+
40+
41+ </ script >
42+
43+ </ head >
44+ < body >
45+
46+ < h1 > Loop</ h1 >
47+ < button onclick ="clickme() "> Click me</ button >
48+ < ul id ="print ">
49+
50+ </ ul >
51+
52+ </ body >
53+ </ html >
You can’t perform that action at this time.
0 commit comments