|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | | - <head> |
4 | | - <title> </title> |
5 | | - <meta |
6 | | - charset="utf-8" |
7 | | - name="viewport" |
8 | | - content="width=device-width, initial-scale=1.0" |
9 | | - /> |
10 | | - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> |
11 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> |
12 | | - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script> |
13 | | - <link |
14 | | - rel="stylesheet" |
15 | | - href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" |
16 | | - /> |
17 | | - <link rel="stylesheet" type="text/css" href="style.css" /> |
18 | | - </head> |
19 | 3 |
|
20 | | - <body> |
21 | | - <div class="jumbotron text-center"> |
22 | | - <h1>Library</h1> |
23 | | - <p>Add books to your virtual library</p> |
24 | | - </div> |
| 4 | +<head> |
| 5 | + <title>Library</title> |
| 6 | + <meta charset="utf-8" /> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 8 | + |
| 9 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> |
| 10 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> |
| 11 | + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script> |
| 12 | + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" /> |
| 13 | + <link rel="stylesheet" type="text/css" href="style.css" /> |
| 14 | +</head> |
25 | 15 |
|
26 | | - <button data-toggle="collapse" data-target="#demo" class="btn btn-info"> |
27 | | - Add new book |
28 | | - </button> |
| 16 | +<body> |
| 17 | + <div class="jumbotron text-center"> |
| 18 | + <h1>Library</h1> |
| 19 | + <p>Add books to your virtual library</p> |
| 20 | + </div> |
29 | 21 |
|
30 | | - <div id="demo" class="collapse"> |
31 | | - <div class="form-group"> |
32 | | - <label for="title">Title:</label> |
33 | | - <input |
34 | | - type="title" |
35 | | - class="form-control" |
36 | | - id="title" |
37 | | - name="title" |
38 | | - required |
39 | | - /> |
40 | | - <label for="author">Author: </label> |
41 | | - <input |
42 | | - type="author" |
43 | | - class="form-control" |
44 | | - id="author" |
45 | | - name="author" |
46 | | - required |
47 | | - /> |
48 | | - <label for="pages">Pages:</label> |
49 | | - <input |
50 | | - type="number" |
51 | | - class="form-control" |
52 | | - id="pages" |
53 | | - name="pages" |
54 | | - required |
55 | | - /> |
56 | | - <label class="form-check-label"> |
57 | | - <input |
58 | | - type="checkbox" |
59 | | - class="form-check-input" |
60 | | - id="check" |
61 | | - value="" |
62 | | - />Read |
63 | | - </label> |
64 | | - <input |
65 | | - type="submit" |
66 | | - value="Submit" |
67 | | - class="btn btn-primary" |
68 | | - onclick="submit();" |
69 | | - /> |
70 | | - </div> |
| 22 | + <button data-toggle="collapse" data-target="#demo" class="btn btn-info"> |
| 23 | + Add new book |
| 24 | + </button> |
| 25 | + |
| 26 | + <div id="demo" class="collapse"> |
| 27 | + <div class="form-group"> |
| 28 | + <label for="title">Title:</label> |
| 29 | + <input type="title" class="form-control" id="title" name="title" required /> |
| 30 | + <label for="author">Author: </label> |
| 31 | + <input type="author" class="form-control" id="author" name="author" required /> |
| 32 | + <label for="pages">Pages:</label> |
| 33 | + <!-- FIXED: add min & step, remove stray '+' --> |
| 34 | + <input type="number" class="form-control" id="pages" name="pages" min="1" step="1" required /> |
| 35 | + <label class="form-check-label"> |
| 36 | + <input type="checkbox" class="form-check-input" id="check" value="" />Read |
| 37 | + </label> |
| 38 | + <input type="submit" value="Submit" class="btn btn-primary" onclick="submit();" /> |
71 | 39 | </div> |
| 40 | + </div> |
| 41 | + |
| 42 | + <table class="table" id="display"> |
| 43 | + <thead class="thead-dark"> |
| 44 | + <tr> |
| 45 | + <th>Title</th> |
| 46 | + <th>Author</th> |
| 47 | + <th>Number of Pages</th> |
| 48 | + <th>Read</th> |
| 49 | + <th></th> |
| 50 | + </tr> |
| 51 | + </thead> |
| 52 | + <tbody> |
| 53 | + <tr> |
| 54 | + <td></td> |
| 55 | + <td></td> |
| 56 | + <td></td> |
| 57 | + <td></td> |
| 58 | + <td></td> |
| 59 | + </tr> |
| 60 | + </tbody> |
| 61 | + </table> |
72 | 62 |
|
73 | | - <table class="table" id="display"> |
74 | | - <thead class="thead-dark"> |
75 | | - <tr> |
76 | | - <th>Title</th> |
77 | | - <th>Author</th> |
78 | | - <th>Number of Pages</th> |
79 | | - <th>Read</th> |
80 | | - <th></th> |
81 | | - </tr> |
82 | | - </thead> |
83 | | - <tbody> |
84 | | - <tr> |
85 | | - <td></td> |
86 | | - <td></td> |
87 | | - <td></td> |
88 | | - <td></td> |
89 | | - <td></td> |
90 | | - </tr> |
91 | | - </tbody> |
92 | | - </table> |
| 63 | + <script src="script.js"></script> |
| 64 | +</body> |
93 | 65 |
|
94 | | - <script src="script.js"></script> |
95 | | - </body> |
96 | 66 | </html> |
0 commit comments