search.ejs
2.27 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
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Nanum+Gothic&display=swap" rel="stylesheet">
<style>
body{
font-family: 'Nanum Gothic', sans-serif;
background-color: rgb(219, 242, 243);
color:black;
margin: 0px;
padding: 0px;
}
table{
font-family: 'Nanum Gothic', sans-serif;
font-size: 20px;
padding: 0px;
margin: 0 auto;
text-align: center;
color: black;
line-height: 1;
border-style: outset;
}
td{
margin: 0px;
padding: 0px;
width: 230px;
border-style: solid;
}
a, a:visited{
color:blue;
text-decoration: none;
}
input[type=submit] {
font-size: 20px;
width: 120px;
height: 60px;
padding: 12px 20px;
margin: 0 auto;
box-sizing: border-box;
text-align: center;
}
#num{
width: 50px;
}
.box{
height:200px;background-color: skyblue; position:relative;
}
h1{
font-size: 60px;
text-align: center;
color: black;
}
h2{
text-align: center;
margin:0px;
}
img{
height:130px;
margin: 0px;
}
</style>
</head>
<body>
<h1>
검색 결과 - <%= itemname%>
</h1>
<center>
<form method="GET" action="./">
<input type="submit" id="button" value="돌아가기">
</form>
</center>
<% for(var i = 0;i < 10 ;i++){ %>
<table>
<tr>
<td id='num'><h2> <%= (i+1) %> </h2></td>
<td><h2> <%= itemname %> </h2></td>
<td><h2> <img src = <%= itemlist[i]['image'] %>></h2> </td>
<td><h2> 최저가 : <%= itemlist[i]['lprice'] %>원</h2> </td>
<td><h2> 최고가 : <%= itemlist[i]['hprice'] %>원</h2> </td>
<td><h2> <a href = <%=itemlist[i]['link']%> target=_blank>구매링크</a></h2></td>
</tr>
</table>
<%}%>
</body>
</html>