Hola 
chiquirf 
Te pongo un pequeño ejemplo, no te costará mucho completarlo:  
 Código PHP:
    <html>
<head>
<script type="text/javascript">
function calcular(frm) {
  ho = parseFloat(frm.horas.value);
  ph = parseFloat(frm.precioHora.value);
  to = ho * ph;
  frm.total.value = to;
}
</script>
</head>
<body>
<form action="javascript:alert('si')" onsubmit="calcular(this)">
<input type="text" name="horas" />
<input type="text" name="precioHora" />
<input type="text" name="total" readonly = "readonly" />
<input type="submit" />
</form>
</body>
</html> 
   
  Saludos, 
