este es mi script de principio a fin
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=utf-8" /> <title>Documento sin título</title> </head> <SCRIPT LANGUAGE="JavaScript"> <!-- function Resultados() { precio = new Number(document.forms[0].elements[0].value) enganche = precio * 0.4 apercredito = (precio - enganche) * 0.03 financiar = (precio - enganche + apercredito) interes6 = (financiar * 0.019 * 6) iva6 = (interes6 * 0.16) cobranza6 = 300 * 6 documentar6 = (financiar + interes6 + iva6 + cobranza6) mensual6 = documentar6 / 6 document.forms[1].elements[0].value = enganche document.forms[1].elements[1].value = apercredito document.forms[1].elements[2].value = financiar document.forms[1].elements[3].value = interes6 document.forms[1].elements[4].value = iva6 document.forms[1].elements[5].value = cobranza6 document.forms[1].elements[6].value = documentar6 document.forms[1].elements[7].value = mensual6 } //--> </SCRIPT> <body> <form name="form1" action="calculo.htm" method=post> <p>Precio: <input type="text" name="minutos"></p> <p> <input type="button" name = "enviar" value="enviar" onclick="Resultados();"> </p> </p> </form> <br /> <form action="calculo.htm" method=post> <table width="441" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="171"> </td> <td width="60">6 meses</td> <td width="111">12meses</td> <td width="99">18meses</td> </tr> <tr> <td>Enganche</td> <td><input type="text" name="enganche" size="10" disabled="disabled"/></td> <td> </td> <td> </td> </tr> <tr> <td>Apertura de Credito</td> <td><input type="text" name="apercredito" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>Cantidad a Financiar</td> <td><input type="text" name="financiar" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>Interes Mensual</td> <td><input type="text" name="interes6" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>16 % I.V.A.</td> <td><input type="text" name="iva6" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>Cobranza</td> <td><input type="text" name="cobranza6" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>Cantidad a Documentar</td> <td><input type="text" name="documentar6" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> <tr> <td>Pago Mensual</td> <td><input type="text" name="mensual6" size="10" disabled="disabled" /></td> <td> </td> <td> </td> </tr> </table> </form> </body> </html>