Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
2.2 kB
2
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Unos podataka</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 600px;
            margin: auto;
            padding: 20px;
            background-color: #f4f4f4;
        }
        input {
            display: block;
            margin-bottom: 10px;
            padding: 8px;
            width: 100%;
        }
        button {
            padding: 10px 15px;
            background-color: #28a745;
            color: white;
            border: none;
            cursor: pointer;
        }
        button:hover {
            background-color: #218838;
        }
        .result {
            margin-top: 20px;
            padding: 10px;
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            display: none;
        }
    </style>
</head>
<body>

    <h2>Unos podataka</h2>
    
    <label for="number">Unesite broj:</label>
    <input type="number" id="number" placeholder="Unesite broj">
    
    <label for="time1">Unesite vreme (sati:minuti:sekunde):</label>
    <input type="time" id="time1" placeholder="Unesite vreme">

    <label for="time2">Unesite vreme (sati:minuti:sekunde):</label>
    <input type="time" id="time2" placeholder="Unesite vreme">
    
    <button onclick="prikaziRezultat()">Prikaži rezultat</button>
    
    <div class="result" id="result">
        <p id="resultText"></p>
    </div>

    <script>
        function prikaziRezultat() {
            var broj = document.getElementById('number').value;
            var vreme1 = document.getElementById('time1').value;
            var vreme2 = document.getElementById('time2').value;

            var rezultat = "Uneti broj: " + broj + "<br>" +
                           "Uneto vreme 1: " + vreme1 + "<br>" +
                           "Uneto vreme 2: " + vreme2;

            document.getElementById('resultText').innerHTML = rezultat;
            document.getElementById('result').style.display = 'block';
        }
    </script>

</body>
</html>
Leave a Comment