코딩

22.01.02 2주차 과제

AMD만세 2022. 1. 2. 02:40
<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
          integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
            integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
            crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
            integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
            crossorigin="anonymous"></script>
    <link href="https://fonts.googleapis.com/css2?family=Jua&family=Stylish&display=swap" rel="stylesheet">
    <title>당근마켓 - LG그램 2016 팝니다</title>
    <style>
        * {
            font-family: sans-serif;
        }

        .wrap {
            width: 800px;
            margin: auto;

        }

        .mytitle {
            background-image: url("https://mblogthumb-phinf.pstatic.net/20160706_66/magiccider4_1467809770317sVYYx_JPEG/IMG_8284.JPG?type=w800");
            width: 700px;
            height: 450px;
            margin: auto;
        }

        .wrap1 {
            width: 700px;
            padding-top: 30px;
            margin: 0px auto 0px auto;
        }

        .small-title {
            font-size: 30px;

        }

        .small-title2 {
            font-size: 20px;
        }

        .form-inline {
            width: 700px;
            margin: auto;
            display: block;
        }

        .button {
            width: 100px;
            margin: auto;
            display: block;
        }
        .mrate {
            color: blue;
        }
    </style>
    <script>

        $(document).ready(function () {
            q1();
        });

        function q1() {
            $.ajax({
                type: "GET",
                url: "http://spartacodingclub.shop/sparta_api/rate",
                data: {},
                success: function (response) {
                    let mrate = response['rate']

                    temp_html=``
                    temp_html = `<span class="mrate">${mrate}</span>`
                    $('#rate-q1').append(temp_html)
                }

            })
        }

    </script>
</head>

<body>
<div class="wrap">
    <div class="mytitle"></div>
    <div class="wrap1">
        <p class="small-title">2016년형 LG그램 14인치 팝니다 <span class="small-title2">가격: 250,000원/대</span></p>
        <p>현재환율: <span id="rate-q1"></span>원</p>
        <p>이 노트북을 2016년 104만원에 구매하여 5년동안 사용했습니다. Windows 미포함임.</p>
    </div>

    <form class="form-inline">
        <label class="sr-only" for="inlineFormInputGroupUsername2"></label>
        <div class="input-group mb-2 mr-sm-2">
            <div class="input-group-prepend">
                <div class="input-group-text">주문자이름</div>
            </div>
            <input type="text" class="form-control" id="inlineFormInputGroupUsername1">
        </div>
    </form>
    <form class="form-inline">
        <label class="sr-only" for="inlineFormInputGroupUsername2"></label>
        <div class="input-group mb-2 mr-sm-2">
            <div class="input-group-prepend">
                <div class="input-group-text">수량</div>
            </div>
            <select class="form-control">
                <option>1대</option>
                <option>2대</option>
            </select>
        </div>
    </form>
    <form class="form-inline">
        <label class="sr-only" for="inlineFormInputGroupUsername2"></label>
        <div class="input-group mb-2 mr-sm-2">
            <div class="input-group-prepend">
                <div class="input-group-text">주소</div>
            </div>
            <input type="text" class="form-control" id="inlineFormInputGroupUsername2">
        </div>
    </form>
    <form class="form-inline">
        <label class="sr-only" for="inlineFormInputGroupUsername2"></label>
        <div class="input-group mb-2 mr-sm-2">
            <div class="input-group-prepend">
                <div class="input-group-text">전화번호</div>
            </div>
            <input type="text" class="form-control" id="inlineFormInputGroupUsername3">
        </div>
    </form>
</div>
<div class="button">
    <button type="submit" class="btn btn-primary">주문하기</button>
</div>

</body>

</html>

'코딩' 카테고리의 다른 글

22.01.12 Git  (0) 2022.01.12
스파르타 코딩클럽 5주차 완강  (0) 2022.01.04
22.01.03 4주차 과제  (0) 2022.01.03
22.01.02 3주차 과제  (0) 2022.01.02
21.12.26 1주차 과제  (0) 2021.12.26