Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/09/2006, 09:52
Avatar de rock_blues.NET
rock_blues.NET
 
Fecha de Ingreso: septiembre-2005
Mensajes: 207
Antigüedad: 19 años, 5 meses
Puntos: 0
estamos trabajando para brindarle un mejor servicio.. jejej ahi ta

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<script language="javascript">
function suma()
{
var tot,i,sw=1,sw_ceros=0;
	tot=0;
	for(i=1; i<=5; i++)
		{
			 var valor = parseInt(document.forms['num']['val'+i].value);
				if(isNaN(valor)==false)
				{
					tot=tot+valor;
				}
		}
				document.forms['num']['total'].value = tot; 
}
</script>
</head>
<form name="num" action="nuevo.html" method="get">
valor 1:<input type="text" name="val1" onblur="suma()" />
<br />
valor 2:<input type="text" name="val2" onblur="suma()" />
<br />
valor 3:<input type="text" name="val3"  onblur="suma()"/>
<br />
valor 4:<input type="text" name="val4" onblur="suma()" />
<br />
valor 5:<input type="text" name="val5" onblur="suma()" />
<br />
<input type="text" style="border:0;" name="total" readonly value="0">
</form>
<body>
</body> 
cuentame com te va