File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed 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 ">
6
+
7
+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css " rel ="stylesheet " integrity ="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3 " crossorigin ="anonymous ">
8
+
9
+ < title > Greet Me App!</ title >
10
+
11
+ < style >
12
+ body {
13
+ width : 100vw ;
14
+ height : 100vh ;
15
+
16
+ background-color : rgb (1 , 21 , 65 );
17
+ }
18
+ </ style >
19
+ </ head >
20
+ < body class ="d-flex flex-column justify-content-center align-items-center ">
21
+
22
+
23
+ < h3 class ="display-4 text-center text-white ">
24
+ I will greet you!
25
+ </ h3 >
26
+ < button class ="mt-3 px-5 btn btn-success fs-2 " onclick ="greetme() ">
27
+ Press me 🤖
28
+ </ button >
29
+ < h3 class ="display-1 text-center text-white mt-5 " id ="greetings "> </ h3 >
30
+
31
+
32
+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js " integrity ="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p " crossorigin ="anonymous "> </ script >
33
+ < script >
34
+ // Function that will greet you when clicked
35
+ function greetme ( ) {
36
+ // Prompt for name
37
+ let name = prompt ( "What's your name?" ) ;
38
+
39
+ // Check name should not be NULL
40
+ if ( name != null ) {
41
+ // Inserts greeting texts into the div
42
+ document . getElementById ( "greetings" ) . innerText = "Hello, " + name + "❤️" ;
43
+ } ;
44
+ } ;
45
+ </ script >
46
+
47
+ </ body >
48
+ </ html >
You can’t perform that action at this time.
0 commit comments