bonjour,
je débute en js et je suis nul de chez nul.
dans un form, j'ai fait çà:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
<form action="" method="get" name="bord" onsubmit="window.print()" enctype="" target="">
<td width="10%"><input type="checkbox" name="numero" value="108"><br />n&deg; 108</td>
<td width="10%"><input type="checkbox" name="numero" value="107"><br />n&deg; 107</td>
 
<td width="10%"><input type="checkbox" name="numero" value="106"><br />n&deg; 106</td>
<td width="10%"><input type="checkbox" name="numero" value="105"><br />n&deg; 105</td>
<td width="10%"><input type="checkbox" name="numero" value="104"><br />n&deg; 104</td>
<td width="10%"><input type="checkbox" name="numero" value="103"><br />n&deg; 103</td>
<td width="10%"><input type="checkbox" name="numero" value="102"><br />n&deg; 102</td>
 
<td width="10%"><input type="checkbox" name="numero" value="101"><br />n&deg; 101</td>
<td width="10%"><input type="checkbox" name="numero" value="100"><br />n&deg; 100</td>
<td width="10%"><input type="checkbox" name="numero" value="99"><br />n&deg; 99</td>
 
//********************** et plus loin
 
<li>Rédigez votre chèque d'un montant de : 
	<SCRIPT language="JavaScript">
		function calc(z){
		var tb=0;
		var i;
                    for(i=0;<z;i++){
                        if(document.getElementsByName("numero")[i].checked==true){
                        tb++;
                     }
                 }
document.write(tb);
	</script>
 € à l'ordre de .......
après je l'appelle par:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
 
<input type="button" value="Convertir" OnClick="calc(<?php print($Nb);?>)"/>
et cela ne me rend aucun résultat.

pouvez-vous me dire pourquoi cela ne fonctionne pas
d'avance merci