La prossima volta casomai dillo primaOriginariamente inviato da Fedina
ehm, scusa la mia ignoranza, ma se dovessi ripetere lo stesso box per quattro volte? Ho provato a ripetere il form, ma o mi da errore, o non mi mostra il risultato..
come faccio?
PS Se cambi il nome al campo devi sostituire anche nome nel rispettivo codice.codice:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> </head> <body> <form name="theform" method="post" action=""> importo 1 <input name="importo_1" type="text" id="importo_1" onKeyUp="if((isNaN(this.value))&&this.value.lastIndexOf('.')==-1){alert('attenzione\n\nInserire solo numeri e il punto come virgola');this.value='';document.theform.percent_1.value='';}else{document.theform.percent_1.value=(this.value)*125/100;}"> % <input name="percent_1" type="text" id="percent_1" size="5"> </p> importo 2 <input name="importo_2" type="text" id="importo_2" onKeyUp="if((isNaN(this.value))&&this.value.lastIndexOf('.')==-1){alert('attenzione\n\nInserire solo numeri e il punto come virgola');this.value='';document.theform.percent_2.value='';}else{document.theform.percent_2.value=(this.value)*125/100;}"> % <input name="percent_2" type="text" id="percent_2" size="5"> </p> importo 3 <input name="importo_3" type="text" id="importo_3" onKeyUp="if((isNaN(this.value))&&this.value.lastIndexOf('.')==-1){alert('attenzione\n\nInserire solo numeri e il punto come virgola');this.value='';document.theform.percent_3.value='';}else{document.theform.percent_3.value=(this.value)*125/100;}"> % <input name="percent_3" type="text" id="percent_3" size="5"> </p> importo 4 <input name="importo_4" type="text" id="importo_4" onKeyUp="if((isNaN(this.value))&&this.value.lastIndexOf('.')==-1){alert('attenzione\n\nInserire solo numeri e il punto come virgola');this.value='';document.theform.percent_4.value='';}else{document.theform.percent_4.value=(this.value)*125/100;}"> % <input name="percent_4" type="text" id="percent_4" size="5"> </p> </form> </body> </html>
![]()

Rispondi quotando