-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooktable.html
192 lines (163 loc) · 5.05 KB
/
booktable.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>데이터베이스</title>
<script src="scripts/disable_right_click.js"></script>
</head>
<body oncontextmenu="return disableRightClick();">
<h1>함봉선도서관</h1>
<topnav>
<ul id="nav"><li>
<div id="left-content">
<ul><li><a href="editaprophile.html">책 수정</a></li></ul>
</div>
<div id="right-content">
<ul><li><a href="loginpage.html">로그아웃하다</a></li></ul>
</div>
</li></ul>
</topnav>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<table class="table table-hover small-text" id="tb">
<tr class="tr-header">
<th style="text-align:center;">저술가</th>
<th style="text-align:center;">제목</th>
<th style="text-align:center;">출판사</th>
<th style="text-align:center;">년</th>
<th><a href="javascript:void(0);" style="font-size:18px;" id="addMore" title="참조 추가"><span class="glyphicon glyphicon-plus"></span></a></th>
<tr>
<td><input type="text" name="author" class="form-control" style="border:solid; border-radius:20px; border-style:inset; margin-top:3px;"></td>
<td><input type="text" name="title" class="form-control" style="border:solid; border-radius:20px; border-style:inset; margin-top:3px;"></td>
<td><input type="text" name="publisher" class="form-control" style="border:solid; border-radius:20px; border-style:inset; margin-top:3px;"></td>
<td><input type="text" name="year" class="form-control" style="border:solid; border-radius:20px; border-style:inset; margin-top:3px;"></td>
<td><a href='javascript:void(0);' class='remove'><span class='glyphicon glyphicon-remove'></span></a></td>
</tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
$(function(){
$('#addMore').on('click', function() {
var data = $("#tb tr:eq(1)").clone(true).appendTo("#tb");
data.find("input").val('');
});
$(document).on('click', '.remove', function() {
var trIndex = $(this).closest("tr").index();
if(trIndex>1) {
$(this).closest("tr").remove();
} else {
alert("미안해요, 첫번째 행이 제거할 수 없습니다.");
}
});
});
</script>
<div class="footer">
<div id="col-0"><li>© All rights reserved</li></div>
</div>
<style>
@media only screen and (min-width: 400px) {
body {
background-color: blueviolet;
}
h1 {
color: white;
text-align: center;
margin-top: 100px;
}
input {
border: solid;
border-radius: 20px;
border-style: inset;
margin-top: 3px;
}
p {
color: white;
margin-left: 80px;
}
table {
width: 100%;
text-align: center;
margin-bottom: 50px;
}
thead {
border: white 3px inset;
transition: all .25s ease-in-out;
}
thead:hover{
background-color: white;
cursor: pointer;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
}
#col-0 li {
list-style-type: none;
margin-right: 20px;
float: right;
color: white;
text-align: left;
text-decoration: none;
}
#nav {
list-style-type: none;
}
#left-content {
width: 50%;
float: left;
}
#left-content li {
list-style-type: none;
float: left;
margin-right: 20px;
}
#left-content li a {
text-decoration: none;
color: white;
}
#left-content li a:hover {
font-weight: bold;
}
#left-content li p {
text-decoration: none;
color: white;
}
#left-content li p:hover {
font-weight: bold;
}
#right-content {
width: 50%;
float: left;
}
#right-content li {
list-style-type: none;
float: right;
margin-right: 20px;
}
#right-content li a {
text-decoration: none;
color: white;
}
#right-content li a:hover {
font-weight: bold;
}
#right-content li p {
text-decoration: none;
color: white;
}
#right-content li p:hover {
font-weight: bold;
}
.header {
padding: 30px;
text-align: center;
background-color: black;
}
}
</style>
</body>
</html>