File tree Expand file tree Collapse file tree 2 files changed +101
-0
lines changed
Expand file tree Collapse file tree 2 files changed +101
-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.0 ">
6+ < title > Document</ title >
7+
8+
9+ < script >
10+
11+ function open_box ( ) {
12+ // console.log("welcome")
13+ //document.write("welcome")
14+ alert ( "welcome to cwpc.in" )
15+ }
16+
17+
18+ </ script >
19+
20+
21+
22+ </ head >
23+ < body >
24+
25+
26+ < button onclick ="open_box() "> Click</ button >
27+
28+
29+
30+ </ body >
31+ </ html >
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+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css " rel ="stylesheet " integrity ="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB " crossorigin ="anonymous ">
8+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js " integrity ="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI " crossorigin ="anonymous "> </ script >
9+
10+
11+ < script >
12+
13+ function open_box ( ) {
14+
15+ number1 = document . getElementById ( "n1" ) . value ;
16+ number2 = document . getElementById ( "n2" ) . value ;
17+
18+ result = + number1 + + number2 ;
19+
20+ //alert(result)
21+
22+ document . getElementById ( "result_print" ) . innerHTML = result
23+
24+
25+ }
26+
27+
28+ </ script >
29+
30+
31+
32+ </ head >
33+ < body >
34+
35+
36+
37+ < div class ="container mt-5 ">
38+
39+ < div class ="row justify-content-center ">
40+ < div class ="col-sm-6 border card border-1 border-black shadow-lg ">
41+
42+ < div class ="m-4 ">
43+ < label class ="form-label "> Number 1</ label >
44+ < input type ="text " id ="n1 " class ="form-control ">
45+ </ div >
46+ < div class ="m-4 ">
47+ < label class ="form-label "> Number 2</ label >
48+ < input type ="text " id ="n2 " class ="form-control ">
49+ </ div >
50+
51+ < div class ="m-4 ">
52+ < button class ="btn btn-danger " onclick ="open_box() "> Submit</ button >
53+ </ div >
54+
55+
56+ < div class ="m-4 ">
57+ < div class ="alert alert-primary fs-1 " role ="alert ">
58+ Result : < span id ="result_print "> </ span >
59+ </ div >
60+ </ div >
61+
62+ </ div >
63+ </ div >
64+
65+ </ div >
66+
67+
68+
69+ </ body >
70+ </ html >
You can’t perform that action at this time.
0 commit comments