a ver si te sirve esto:
  Código HTML:
 <html>
 <head>
  <script type="text/javascript">
   function SeeInput(valor1,valor2,valor3)
    {
     valor1=parseInt(document.getElementById(valor1).value); //valor del input 1
     valor2=parseInt(document.getElementById(valor2).value); // valor del input 2    
     if(isNaN(valor1)==false || isNaN(valor2)==false) // isNaN significa Non alpha Numeric
      {
        document.getElementById(valor3).value=1; // asignamos valor al input 3
      }     
    }
  </script>
 </head>
 <body>
  <form>
   <input type="text" name="uno" id="uno" onchange="SeeInput('uno','dos','tres')" />
   <input type="text" name="dos" id="dos" onchange="SeeInput('uno','dos','tres')" />
   <input type="text" name="tres" id="tres" readonly />
   </form>
 </body>
</html>