codice:<form id="form1" name="form1" method="post" action="" onsubmit="return calcola();"> <label> <input name="quantita" id="q1" type="text" value="5" /> * </label> <label> <input name="cifra_fissa" id="q2" type="text" value="50.00" /> + </label> <label> <input name="cifra_da_sommare" id="q3" type="text" value="84.00" /> </label> <label> <input type="text" name="totale" id="totale" value="?" /> </label> <input type="submit" value="calcola" /> </form> <script type="text/javascript"> function calcola() { var q1 = parseFloat(document.getElementById('q1').value); var q2 = parseFloat(document.getElementById('q2').value); var q3 = parseFloat(document.getElementById('q3').value); document.getElementById('totale').value = (q1 * q2) + q3; return false; } </script>