Java Script
|
|
![]() |
|
|
|
|
Si buscas
hosting web,
dominios web,
correos empresariales o
crear páginas web gratis,
ingresa a
PaginaMX
![]() ![]() <html> <head> <title> FACTORIAL DE UN NUMERO </title> <script language="javascript"> function factorial (form){ var xynum=eval(form.xnum.value) var xyres=eval(form.xres.value) if(xynum<0){ form.xres.value="ERROR" } else{ if((xynum==0)||(xynum==1)){ form.xres.value=1; } else{ y=xynum; xres=xynum; while(y>=1){ xres=xres*y; } form.xres.value=xres; } } function aaa(){ window.close(); } } </script> </head> <body> <marquee bgcolor="purple" behavior=alternate> <i><font size=5 color="pink" face="algebrian"> FACTORIAL DE UN NUMERO </font> </i> </marquee> <form> <center> <table border="0" bgcolor="purple"> <tr> <td> Numero </td> <td> <input type="text" name="xnum"><br><br> </td> </tr> <tr> <td>Resultado</td> <td> <input type="text" name="xres"><br><br> </tr> </table> <input type="reset" name="Limpiar" value="Limpiar"> <input type="button" name="Generar" value="Generar" onclick="factorial(this.form)"> <input type="button" name="salir" value="salir" onclick="aaa()"> </form> </body> </html> |
Tu Sitio Web Gratis © 2025 Java Script28828 |