![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
23/02/2007, 05:16
|
| | Fecha de Ingreso: diciembre-2006
Mensajes: 19
Antigüedad: 18 años, 1 mes Puntos: 1 | |
Re: Función muy sencilla que no va en Firefox. Por si a alguien le interesa aqui está la solución; gracias por el aviso Javier ;)
<html>
<head>
<script language="javascript">
function mete(valor)
{
total.value = parseFloat(total.value) + valor;
total.value = Number(total.value).toFixed(2)
cuenta_moneda.value = parseInt(cuenta_moneda.value) + 1;
}
</script>
</head>
<body>
<img src='2centimo.jpg' onclick='mete(0.02);'><br>
Cuento las veces que meto esa moneda:<br>
<input type="text" id="cuenta_moneda" name="cuenta_moneda" value="0"><br><br>
Total euros:<br>
<input type="text" id="total" name="total" value="0.00" size="2">
</body>
</html> |