Boas pessoal é assim eu estou a fazer uma calculadora de imc para website utilizando html,css e javascript mas não está funcionando quando carrego no botão carregar alguem me ajuda?
O codigo html é:
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='style.css'/>
<script src='script.js'></script>
</head>
<body>
<img src="http://static.hsw.com.br/gif/bmi-comparison.gif"/>
<form id="formulario">
<fieldset>
<legend> Cálculo do IMC</legend>
<label for="kilo">Kilos:</label>
<input type="text" name="kilo"/>
<label for="metros">Metros:</label>
<input type="text" name"metros"/>
<label for="centimetros">Cm:</label>
<input type="text" name"centimetros"/>
<label for="imc">IMC:</label>
<input text="text" name="imc" disabled="disabled" />
<a href="#" onclick="calcularIMC();">Calcular</a>
</fieldset>
</form>
<table>
<tr><th>IMC</th><th>Classificação</th></tr>
<tr><td><20</td><td>Abaixo do Peso</td></tr>
<tr><td>20 a 25</td><td>Peso ideal</td></tr>
<tr><td>30 a 35</td><td>Obesidade Moderada</td></tr>
</table>
</body>
</html>
o codigo css:
img.table{ width:165px;}
fieldset { width:140px;}
label { display:block; ; float:left;}
label, input { width:68px; margin: 3px 0;}
th,ted { border:1px solid #ccc; font-size:0 8em;}
o codigo javascript:
function calcularIMC () {
var formulario= document.getElementById("formulario");
var kilo= + formulario.kilo.value;
var metros= + formulario.metros.value;
var centimetros= + formulario.centimetros.value;
var altura=(metros*100 + centimetros)/100;
var imc= kilo/(altura*altura);
formulario.imc.value = imc.toFixed(2);
}