Código HTML:
<script language="javascript"> function formulario(n_opt){ with (window.pantalla.document){ open(); writeln("<html>\n<body>"); writeln("<form name='frm'>"); writeln("Numero de Datos a Examinar: <input type='text' name='n_opt' size='3' value='" + n_opt + "'>"); writeln("<input type='button' value='Examinar' onClick='parent.formulario(frm.n_opt.value)'>"); writeln("<br>"); for (i=1;i<=n_opt;i++){ writeln("Valor x " + i + " $ <input type='text' name='valorx" + i + "' value='' size='9'> Valor y " + i + " $ <input type='text' name='valory" + i + "' value='' size='9'>"); writeln("<br>"); } writeln("<br>"); writeln('<input type="button" value="calcular" onClick="parent.calcula()">'); writeln("</form>"); writeln("</body>\n</html>"); close(); } }