miércoles, 10 de noviembre de 2010

JAVA CAJA DE OPERACIONES MATEMATICAS

<head>
<title>operaciones</title>
<script language="JavaScript" type="text/JavaScript">
function Calcular(){
document.forms['operaciones'].resultado.value=document.forms['operaciones'].numero_a.value*1+document.forms['operaciones'].numero_b.value*1;  
}
function multiplicar(){
document.forms['operaciones'].resultado3.value=document.forms['operaciones'].numero_a.value*1*document.forms['operaciones'].numero_b.value*1;  
}
function restar(){
document.forms['operaciones'].resultado2.value=document.forms['operaciones'].numero_a.value-document.forms['operaciones'].numero_b.value;  
}
function dividir(){
document.forms['operaciones'].resultado4.value=document.forms['operaciones'].numero_a.value/document.forms['operaciones'].numero_b.value;  
}
</script>
</head>
<body>
 <form action="" method="post" id="operaciones" name="operaciones">
   <table width="90%" border="1" align="center" cellpadding="1" cellspacing="3">
     <tr>
       <td bgcolor="#FFF0B3" class="CENTRO"><strong>
    GINA KUKIS. UFPSO </strong></td>
     </tr>
     <tr>
       <td bgcolor="#FFF0B3">Digite el numero A
       <input type="text" name="numero_a" id="numero_a" /></td>
     </tr>
     <tr>
       <td>Digite el numero B
       <input type="text" name="numero_b" id="numero_b" /></td>
     </tr>
     <tr>
       <td>El resultado es:
       <input type="text" name="resultado" id="resultado"  readonly="readonly"/></td>
     </tr>
     <tr>
       <td>el resultado de la multiplicacion es
       <input type="text" name="resultado3" id="resultado3"  readonly="readonly"/></td>
     </tr>
     <tr>
       <td>el resultado da la divicion es
       <input type="text" name="resultado4" id="resultado4"  readonly="readonly"/></td>
     </tr>
     <tr>
       <td>el resultado de la resta es
         <input name="resultado2" type="text" id="resultado2"></td>
     </tr>
     <tr>
       <td><label></label>
           <label>
           <input type="button" name="button" id="button" value="Sumar"  onclick="Javascript: Calcular();"/>
           <input type="button" name="Submit" value="restar" onclick="Javascript:
 restar();">
           <input type="button" name="Submit2" value="multiplicar" onclick="Javascript: multiplicar();">
           <input type="button" name="Submit22" value="dividir" onclick="Javascript:
dividir();">
         </label></td>
     </tr>
   </table>
</form>
</body>
</html>

operaciones





GINA KUKIS. UFPSO
Digite el numero A
Digite el numero B
El resultado es:
el resultado de la multiplicacion es
el resultado da la divicion es
el resultado de la resta es



No hay comentarios:

Publicar un comentario