inceprivate adlı üyeden alıntı: mesajı görüntüle
"Vücut Yağ Oranı Hesaplama botu yazar mısın , html , css ve js olsun" diyorum, https://chatbot.theb.ai kullanıyorum





<style>
form {
            margin-top: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        input[type="number"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border-radius: 5px;
            border: none;
            box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
        }

        button[type="submit"] {
            padding: 10px;
            border-radius: 5px;
            border: none;
            background-color: #4CAF50;
            color: white;
            font-size: 16px;
            cursor: pointer;
        }

        button[type="submit"]:hover {
            background-color: #3E8E41;
        }

        .result {
            margin-top: 30px;
            text-align: center;
            font-size: 24px;
            font-weight: bold;
        }
</style>
</head>
<body>
    <div class="container">
        <h1>Vücut Kitle İndeksi Hesaplama</h1>

        <form id="bmiForm">
            <label for="height">Boy (cm): </label>
            <input type="number" id="height" name="height" placeholder="Örn: 170" required><br>

            <label for="weight">Kilo (kg): </label>
            <input type="number" id="weight" name="weight" placeholder="Örn: 70" required><br>

            <button type="submit">Hesapla</button>
        </form>

        <div id="result"></div>
    </div>

    <script>
        const form = document.getElementById("bmiForm");
        const resultDiv = document.getElementById("result");

        form.addEventListener("submit", (event) => {
            event.preventDefault();

            const height = parseInt(document.getElementById("height").value);
            const weight = parseInt(document.getElementById("weight").value);

            if (isNaN(height) || isNaN(weight)) {
                resultDiv.innerHTML = "Lütfen geçerli bir boy ve kilo giriniz.";
            } else if (height <= 0 || weight <= 0) {
                resultDiv.innerHTML = "Lütfen geçerli bir boy ve kilo giriniz.";
            } else {
                const bmi = weight / ((height/100) ** 2);
                resultDiv.innerHTML = `Vücut Kitle İndeksiniz: ${bmi.toFixed(2)}`;

                if (bmi < 18.5) {
                    resultDiv.innerHTML += "<br>Zayıf";
                } else if (bmi < 25) {
                    resultDiv.innerHTML += "<br>Normal";
                } else if (bmi < 30) {
                    resultDiv.innerHTML += "<br>Fazla Kilolu";
                } else {
                    resultDiv.innerHTML += "<br>Obez";
                }
            }
        });
    </script>
ozaman kücük bir soru daha bunu eklemek için hangi eklentiyi kullanıyorsunuz wpde