1

Temat: Zadanie JS (5)

https://www.praktycznyegzamin.pl/inf03e … _02_SG.pdf

2

Odp: Zadanie JS (5)

<script>
        function czysc(){
            document.getElementById("imie").value = "";
            document.getElementById("nazwisko").value = "";
            document.getElementById("email").value = "";
            document.getElementById("zgloszenie").value = "";

        }
        function wyslij() {
            let imie = document.getElementById("imie").value;
            let nazwisko = document.getElementById("nazwisko").value;
            let email = document.getElementById("email").value;
            let zgloszenie = document.getElementById("zgloszenie").value;
            let wynik = document.getElementById("wynik");
            wynik.innerHTML = imie+" "+nazwisko+"<br>"+email+"<br>Usług: "+zgloszenie;
        }
    </script>


    <h2>Kontakt</h2>
    <table>
        <tr>
            <td>
                <label for="imie">Imie</label>
            </td>
            <td>
                <input type="text" id="imie" name="imie">
            </td>
        </tr>
        <tr>
            <td>
                <label for="nazwisko">Nazwisko:</label>
            </td>
            <td>
                <input type="text" id="nazwisko" name="nazwisko">
            </td>
        </tr>
        <tr>
            <td>
                <label for="email">Email:</label>
            </td>
            <td>
                <input type="email" id="email" name="email">
            </td>
        </tr>
        <tr>
            <td>
                <label for="zgloszenie">zgloszenie</label>
            </td>
            <td>
                <select name="zgloszenie" id="zgloszenie">
                    <option value="naprawa komputerow">naprawa komputerow</option>
                    <option value="odzyskiwanie danych">odzyskiwanie danych</option>
                    <option value="wirusy">wirusy</option>
                    <option value="konfiguracja LAN">konfiguracja LAN</option>
                </select>
            </td>
        </tr>
        <tr>
            <td></td>
            <td><input type="checkbox" name="kopia" id="kopia" checked>Wyslij kopie wiadomosci</td>

        </tr>
        <tr>
            <td></td>
            <td><button type="reset" onclick="czysc()">Czysc</button><button type="submit" onclick="wyslij()">Wyslij</button></td>
            <hr>
        </tr>
    </table>
    <hr>
<div style="text-align: center;">
    <span id="wynik"></span>
</div>