»
AnglaisFranaisVietnamien

Imprimer - Metric BMI Calculator - JavaScriptBank.com

Version complte: jsB@nk » Calcul » Metric BMI Calculator
URL: http://www.javascriptbank.com/metric-bmi-calculator.html

Metric BMI Calculator © JavaScriptBank.comUtilisez cette JavaScript pour calculer votre BMI (Body Mass Index). Les mesures sont calculées en utilisant le système métrique. Un complément idéal pour un site Web de la santé.

Version complte: jsB@nk » Calcul » Metric BMI Calculator
URL: http://www.javascriptbank.com/metric-bmi-calculator.html



JavaScript
<script type="text/javascript"><!-- Created by: Bob Mason--><!-- Beginfunction  calculateBMI() {  var weight = eval(document.form.weight.value)  var height = eval(document.form.height.value)  var height2 = height / 100  var BMI = weight  / (height2 * height2)  document.form.BodyMassIndex.value=custRound(BMI,1);}function custRound(x,places) {  return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)}// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form  name="form" id="form"><input type="Text" name="weight" size="4"> Weight (in Kilos)  <input type="Text" name="height" size="4"> Height (in Centimeters)<br><br><input type="Text" name="BodyMassIndex" id="BodyMassIndex" size="4"> BMI     <input type="button" style="font-size: 8pt" value="Calculate" onClick="calculateBMI()" name="button"><input type="reset" style="font-size: 8pt" value="Clear Form"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->