-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.html
More file actions
77 lines (72 loc) · 2.4 KB
/
view.html
File metadata and controls
77 lines (72 loc) · 2.4 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>view.html</title>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="my.css">
<style>
.div_data {
font-weight: 600;
}
</style>
</head>
<body>
<div class="container mt-4">
<h2>선택한 휴대폰 정보</h2>
<table class="table table-striped" style="text-align: center;">
<thead>
<tr>
<th>기종</th>
<th>폰회사</th>
<th>가격</th>
<th>수량</th>
<th>용량</th>
<th>상태</th>
</tr>
</thead>
<tbody id="phone-info">
<tr>
<td>Z-flip4</td>
<td>삼성</td>
<td>70만원</td>
<td>15개</td>
<td>64GB</td>
<td>좋음</td>
</tr>
</tbody>
</table>
<div style="text-align:left;padding:5px 0px;">
<a href="./add.html" class="btn btn-primary">추가</a>
<a href="./edit.html" class="btn btn-primary">수정</a>
<a href="javascript:confirm('지울껍니까?')" class="btn btn-primary">삭제</a>
<a href="./index.html" class="btn btn-primary">목록</a>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const params = new URLSearchParams(window.location.search);
const model = params.get('model');
const company = params.get('company');
const price = params.get('price');
const quantity = params.get('quantity');
const capacity = params.get('capacity');
const status = params.get('status');
if (model) {
document.getElementById('phone-info').innerHTML = `
<tr>
<td>${model}</td>
<td>${company}</td>
<td>${price}</td>
<td>${quantity}</td>
<td>${capacity}</td>
<td>${status}</td>
</tr>
`;
}
});
</script>
</body>
</html>