File size: 2,157 Bytes
9a0c1bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Checkout</title>
    <link href="style.css" rel="stylesheet">
</head>
<body class="bg-gray-100">
    <header class="bg-amazon-blue p-4 text-white">
        <div class="container mx-auto">
            <div class="flex justify-between items-center">
                <h1 class="text-2xl font-bold">Amazon Dummy</h1>
                <a href="cart.html" class="text-white">Cart</a>
            </div>
        </div>
    </header>

    <main class="container mx-auto mt-8">
        <h2 class="text-2xl font-semibold mb-4">Checkout</h2>

        <form id="checkout-form">
            <div class="mb-4">
                <label for="shipping-address" class="block text-gray-700 text-sm font-bold mb-2">Shipping Address:</label>
                <textarea id="shipping-address" name="shipping-address" rows="4" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
            </div>

            <div class="mb-4">
                <label for="payment-info" class="block text-gray-700 text-sm font-bold mb-2">Payment Information:</label>
                <input type="text" id="payment-info" name="payment-info" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
            </div>

            <button type="submit" class="bg-amazon-yellow hover:bg-yellow-500 text-black font-bold py-2 px-4 rounded">
                Place Order
            </button>
        </form>
    </main>

    <footer class="bg-gray-200 p-4 mt-8 text-center">
        <p>&copy; 2024 Amazon Dummy</p>
    </footer>
</body>
</html>

<script>

    document.getElementById('checkout-form').addEventListener('submit', function(event) {

        event.preventDefault(); // Prevent the default form submission



        // Redirect to the confirmation page

        window.location.href = 'confirmation.html';

    });

</script>