search.ejs 2.27 KB
<!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>