15/03/2005, 17:26
|
| | | Fecha de Ingreso: febrero-2005
Mensajes: 994
Antigüedad: 19 años, 9 meses Puntos: 9 | |
<head>
<title>Untitled</title>
<style>*{font:normal 12px/12px courier}</style>
<script>
function sumar(esto){
a=Number(esto['carne'].value);
b=Number(esto['pollo'].value);
a=(isNaN(a))?0:a;
b=(isNaN(b))?0:b;
esto['total'].value=a+b;
esto.pollo1.value=b
esto.carne1.value=a
esto.total1.value=esto.total.value
}
</script>
</head>
<body>
<form>
Pollo....<input type="text" style="text-align:right;" onkeyup="this.form.pollo1.value=this.value;sumar(t his.form)" name="pollo"><br>
Carne....<input type="text" style="text-align:right;" onkeyup="this.form.carne1.value=this.value;sumar(t his.form)" name="carne"><br>
_______________________________<br>
<br>
Total ...<input type="text" style="text-align:right;" readonly name="total" size="6"><br>
Pollo....<input type="text" style="text-align:right;" onkeyup="this.form.pollo.value=this.value;sumar(th is.form)" name="pollo1"><br>
Carne....<input type="text" style="text-align:right;" onkeyup="this.form.carne.value=this.value;sumar(th is.form)" name="carne1"><br>
_______________________________<br>
<br>
Total ...<input type="text" style="text-align:right;" readonly name="total1" size="6"><br>
</form> |