Ecco come puoi fare....
codice:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <script language="JavaScript" type="text/javascript"> <!-- tot_isr = 10; tot_vig = 10; tot_bra = 10; tot_gre = 10; tot_lib = 10; tot_tri = 10; tot_mon = 1; tot_ita = 10; var arrVal = new Array(); arrVal[arrVal.length] = tot_isr ; arrVal[arrVal.length] = tot_vig ; arrVal[arrVal.length] = tot_bra ; arrVal[arrVal.length] = tot_gre ; arrVal[arrVal.length] = tot_lib ; arrVal[arrVal.length] = tot_tri ; arrVal[arrVal.length] = tot_mon ; arrVal[arrVal.length] = tot_ita ; ok = true; for (i=0;i<arrVal.length;i++) { for (j=0;j<arrVal.length;j++) { if (arrVal[i] != arrVal[j]) { ok = false; } // if (arrVal[i] != arrVal[j]) } // for (j=0;j<arrVal.length;j++) } // for (i=0;i<arrVal.length;i++) alert(ok); //--> </script> </body> </html>

Rispondi quotando