Conjugator de verbes en Francais

 <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>French Verb Conjugator</title>

    <style>

        /* Add your styles here */

    </style>

</head>

<body>

    <h1>French Verb Conjugator</h1>


    <label for="verbInput">Enter a verb:</label>

    <input type="text" id="verbInput" placeholder="e.g., parler">


    <button onclick="conjugateVerb()">Conjugate</button>


    <h2>Conjugations:</h2>

    <div id="conjugations"></div>


    <script>

        function conjugateVerb() {

            const verb = document.getElementById('verbInput').value;

            const conjugations = {

                je: `je ${verb}`,

                tu: `tu ${verb}`,

                il: `il/elle/on ${verb}`,

                nous: `nous ${verb}`,

                vous: `vous ${verb}`,

                ils: `ils/elles ${verb}`

            };


            // Display conjugations

            const conjugationsDiv = document.getElementById('conjugations');

            conjugationsDiv.innerHTML = '';

            for (const [pronoun, conjugation] of Object.entries(conjugations)) {

                const p = document.createElement('p');

                p.textContent = `${pronoun}: ${conjugation}`;

                conjugationsDiv.appendChild(p);

            }

        }

    </script>

</body>

</html>


Comments