Velocidade das ondas
HTML
<body>
<form id="formulario">
<fieldset>
<legend>velocidade das ondas</legend>
<label for="comprimento">comprimento:</label>
<input type="text" name="comprimento"/>
<label for="frequencia">frequencia:</label>
<input type="text" name="frequencia"/>
<label for="velocidade">velocidade:</label>
<input type="text" name="velocidade"/>
<a href="#" onclick="calcularvelocidade()">Calcular</a>
</fieldset>
</form>
</body>
CSS
img, table { width:165px; }
fieldset { width:140px; }
label { display:block; float:left;}
label, input {width:68px; margin:3px 0; }
th, td {border:1px solid #ccc; font-size:0.8em;}
JAVASCRIPT
calcularvelocidade = function(){
var formulario = document.getElementById("formulario");
var comprimento = +formulario.comprimento.value;
var frequencia = +formulario.frequencia.value;
var velocidade = comprimento*frequencia;
formulario.velocidade.value = velocidade.toFixed(2);
}