Programalama > HTML

Etiketler: kilonuza, göre, kadar, diyet

Ort. 0
Puan ver:
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1254">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Team Giga</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p align="center">COMMENTS: Enter your weight in kilograms and
your height in centimeters<br>
in the form below and press the "Let's see" button<br>
</p>

<form method="POST" name="BMI">
    <div align="center"><center><table border="1">
        <tr>
            <td>Kilonuzu Giriniz</td>
            <td>Boyunuzu Giriniz</td>
            <td>Your BMI</td>
            <td>My Comment</td>
        </tr>
        <tr>
            <td><input type="text" size="10" name="weight"
            onfocus="this.form.weight.value=''"></td>
            <td><input type="text" size="10" name="height"
            onfocus="this.form.height.value=''"></td>
            <td><input type="text" size="8" name="bmi"></td>
            <td><input type="text" size="20" name="my_comment"></td>
        </tr>
    </table>
    </center></div><p align="center"><input type="button"
    value="Let's see" onclick="computeform(this.form)"> <input
    type="reset" value="Reset" onclick="ClearForm(this.form)"> </p>
</form>

<hr>

<p><script language="JAVASCRIPT">

<!-- hide this script tag's contents from old browsers



function ClearForm(form){



    form.weight.value = "";

    form.height.value = "";

    form.bmi.value = "";

    form.my_comment.value = "";



}



function bmi(weight, height) {



          bmindx=weight/eval(height*height);

          return bmindx;

}



function checkform(form) {



       if (form.weight.value==null||form.weight.value.length==0 || form.height.value==null||form.height.value.length==0){

            alert("\nPlease complete the form first");

            return false;

       }



       else if (parseFloat(form.height.value) <= 0||

                parseFloat(form.height.value) >=500||

                parseFloat(form.weight.value) <= 0||

                parseFloat(form.weight.value) >=500){

                alert("\nReally know what you're doing? \nPlease enter values again. \nWeight in kilos and \nheight in cm");

                ClearForm(form);

                return false;

       }

       return true;



}



function computeform(form) {



       if (checkform(form)) {



       yourbmi=Math.round(bmi(form.weight.value, form.height.value/100));

       form.bmi.value=yourbmi;



       if (yourbmi >40) {

          form.my_comment.value="You are grossly obese, consult your physician!";

       }



       else if (yourbmi >30 && yourbmi <=40) {

          form.my_comment.value="Umm... You are obese, want some liposuction?";

       }



       else if (yourbmi >27 && yourbmi <=30) {

          form.my_comment.value="You are very fat, do something before it's too late";

       }



       else if (yourbmi >22 && yourbmi <=27) {

          form.my_comment.value="You are fat, need dieting and exercise";

       }



       else if (yourbmi >=21 && yourbmi <=22) {

          form.my_comment.value="I envy you. Keep it up!!";

       }



       else if (yourbmi >=18 && yourbmi <21) {

          form.my_comment.value="You are thin, eat more.";

       }



       else if (yourbmi >=16 && yourbmi <18) {

          form.my_comment.value="You are starving. Go Find some food!";

       }



       else if (yourbmi <16) {

          form.my_comment.value="You're grossly undernourished, need hospitalization ";

       }



       }

       return;

}

 // -- done hiding from old browsers -->

</script></p>

<p align="center"><a href="http://www.adresonline.gen.tr.tc"><font
color="#FF0000" size="2" face="Tahoma"><strong><u>ADRES</u></strong></font><font
color="#0000FF" size="2" face="Tahoma"><strong><u>ONLİNE</u></strong></font></a></p>

<p align="center"><a href="http://www.adresonline.gen.tr.tc"><font
color="#FF0000" size="2" face="Tahoma"><strong>İNTERNET
KAYNAKLARI - WEBMASTER ARAÇ - GEREÇLERİ</strong></font></a></p>

<p align="center"><a href="http://www.adresonline.gen.tr.tc"><font
color="#FF0000" size="2" face="Tahoma"><strong>ARAMAK YETMEZ </strong></font><font
size="2" face="Tahoma"><strong>-</strong></font><font
color="#0000FF" size="2" face="Tahoma"><strong> BULMAK LAZIM</strong></font></a></p>
</body>
</html>


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.