Dashboard Temp Share Shortlinks Frames API

HTMLify

22mrx9f3x6.txt
Views: 315 | Author: guest
  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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Date of Birth calculator</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f4f8;
            color: #333;
            text-align: center;
        }

        header {
            background-color: #4190e8;
            padding: 1px;
            color: white;
            
        }

        main {
            margin: 20px;
        }

        input {
            padding: 10px;
            margin-top: 10px;
            width: 250px; /* Set a width for the input */
            border: 1px solid #ccc; /* Add a border */
            border-radius: 5px; /* Rounded corners */
        }

        input::placeholder {
            color: rgba(0, 0, 0, 0.5); /* Transparent placeholder text */
        }

        button {
            padding: 5px 15px;
            background-color: #4a90e2;
            color: white;
            border: none;
            border-radius: 5px; /* Rounded corners for button */
            cursor: pointer;
        }

        button:hover {
            background-color: #357ab8;
        }

        .hidden {
            display: none;
        }

        footer {
            margin-top: 20px;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <header>
        <h1>Date of Birth calculator</h1>
    </header>

    <main>
        <label for="dob">choose your date of birth:</label>
        <input type="date" id="dob" name="dob" required>
        <div>
        <button id="submitBtn">Submit</button>
</div>
        <div id="result" class="hidden">
            <h2>Your Date of Birth:</h2>
            <p id="dobOutput"></p>
        </div>

        <div id="copySection" class="hidden">
            <input type="text" id="myInput" placeholder="Paste your DOB here" style="width: 250px; margin-top: 10px;">
            <button onclick="copyText()">Copy</button>
        </div>
    </main>

    <footer id="footer" class="hidden">
        <p>&copy; 2024 Award Winning Website by amar
        </p>
    </footer>

    <script>
        function copyText() {
            const input = document.getElementById("myInput");
            input.select();
            document.execCommand("copy");
            alert("Copied: " + input.value);
        }

        document.getElementById('submitBtn').addEventListener('click', function() {
            const dobInput = document.getElementById('dob').value;
            const resultDiv = document.getElementById('result');
            const dobOutput = document.getElementById('dobOutput');
            const copySection = document.getElementById('copySection');
            const footer = document.getElementById('footer');

            if (dobInput) {
                dobOutput.textContent = dobInput; // Display the date of birth
                resultDiv.classList.remove('hidden'); // Show the result section
                copySection.classList.remove('hidden'); // Show the copy section
                footer.classList.remove('hidden'); // Show the footer
            } else {
                alert('Please enter a valid date of birth.');
            }
        });
    </script>
</body>
</html>