Form
codice:
<form action="test.php" method="post" id="form1" >
Prezzo: <input type="text" id="prezzo_uni1" name="prezzo_uni1" value="" >
Iva: <input type="text" id="iva1" name="iva1" value="" >
Quantità: <input type="text" id="quantita1" name="quantita1" value="" >
<input type="button" value="calcola" onclick="calcola1()" id=button1 name=button1>
Totale: <input type="text" id="totale1" name="totale1" value="" >
</form>
script
codice:
<script type="text/javascript">
function calcola1(){
var prezzo = parseFloat(document.getElementById ("prezzo_uni1").value);
var iva=document.getElementById ("iva1").value
iva=(prezzo*iva)/100
var q =document.getElementById ("quantita1").value
document.getElementById ("totale1").value =parseFloat((prezzo + iva)*q);
}
</script>
che errori ti da?