Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/12/2003, 16:46
Avatar de tunait
tunait
Moderadora
 
Fecha de Ingreso: agosto-2001
Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 22 años, 8 meses
Puntos: 381
fale, creo que ahora yá va ok

<script language="JavaScript">
function pepe(cual){
perico1 = new Number(cual.pepe1.value.replace(/\,/,""))
perico2 = new Number(cual.pepe2.value.replace(/\,/,""))
perico3 = perico1 + perico2
lar = perico3.toString().substring(0,(perico3.toString() .indexOf('\.')-1)).length
alert(perico3.toString().substring(0,(perico3.toSt ring().indexOf('\.'))))
var numerillos = "", cont = 1
for(m=lar; m>=0;m--){

numerillos = perico3.toString().charAt(m) + numerillos
if((cont%3) ==0 && m < lar){
numerillos = "," + numerillos
}
cont++
}
numerillos +=perico3.toString().substr(perico3.toString().ind exOf('\.'))
cual.valorFinal.value = numerillos
}
</script>

Yá me contarás