Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/06/2005, 08:12
Avatar de xcars
xcars
 
Fecha de Ingreso: mayo-2005
Ubicación: El Salvador
Mensajes: 753
Antigüedad: 19 años, 10 meses
Puntos: 4
bueno, ya lo solucione, si a alguien le interesa aki esta la forma de hacerlo

Código:
<html>
<head>
<title>Probando CheckBox</title>
</head>
<form name="QForm" method="post" action="">

<input name="txtTotal" type="text" id="txtTotal" value="0.00" size="10" readonly="true">

<tr>
    <td bgcolor="#CCCCCC"><strong><font color="#0066FF" size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input name="chkFut" type="checkbox" id="chkFut" value="1" onClick="calcular(chkFut)">
      F&uacute;tbol Salvadore&ntilde;o </font></strong></td>
  </tr>
</form>
</body>
</html>

<script language="JavaScript" >
function calcular(elemento)
{
	var s=elemento.checked;
	if (s){
		document.forms[0].txtTotal.value=(parseFloat(document.forms[0].txtTotal.value)+1.00).toFixed(2);
	}
	else{	
		document.forms[0].txtTotal.value=(parseFloat(document.forms[0].txtTotal.value)-1.00).toFixed(2);
	}
}
</script>