codice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript"> function percentuale(importo,ali) { var imponibile = eval(importo) var aliquota = ali == "" ? 0 : eval(ali) lordo = ((imponibile * aliquota)/100)+ imponibile; document.getElementById("member_id").innerHTML=lordo; } </script> <title>Documento senza titolo</title> </head> <body> <form name="form"> Quando cambio campo lui scrive nel div Imponibile netto:<input type="text" name="imponibile" maxlength="9" style="text-align:right;" onchange="percentuale(this.value,document.getElementById('aliquota').value);" id="imponibile" /> € Aliquota IVA: <input type="text" name="IVA" maxlength="9" style="text-align:right;" onchange="percentuale(document.getElementById('imponibile').value,this.value);" id="aliquota" /> % <span style="font-weight:bold;border:solid 1px#FFFF4D;">Lordo <span id="member_id"></span> €</span></td></tr> </form> </body> </html>![]()