Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/09/2005, 18:05
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 9 meses
Puntos: 39
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!--
function Suma(isChecked, myValue)
{
	tot = parseInt(document.form1.total.value);
	myValue = parseInt(myValue);
	if (isChecked) document.form1.total.value = tot + myValue;
	else document.form1.total.value = tot - myValue;
}
-->
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <input name="checkbox" type="checkbox" onClick="Suma(this.checked,this.value)" value="100">
  </p>
  <p>
    <input type="checkbox" name="checkbox2" onClick="Suma(this.checked,this.value)" value="50">
  </p>
  <p>
    <input type="text" name="total" value="0">
  </p>
</form>
</body>
</html>