bonjour je suis débutant dans le développement web voila j'ai un pbl j'ai une page dans la quelle il y a un formulaire qui est séparer en 2 tableaux
le 1 er tableau il y a 2 champs texte ( pas de pbl a se niveau )
dans le 2 ème tableau j'ai 9 champs texte et un bouton ajouter ( c'est ici que j'ai un pbl : je voudrais quand je clique sur le bouton ajouter il m'ajoute le même tableau avec les même 9 champs en bas de se tableau ) je sais pas quoi écrire comme code java script pour faire ça
je vous donne le code html merci :

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<table width="738" height="440" border="0" cellpadding="0" cellspacing="0" bgcolor="#00C0FF">
<tbody><tr>
<td align="center" valign="top">
 
<form action='' method="post" name="form1_fr" onSubmit="return verif_formulaire();">
<table width="716" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ccffff">
  <tbody>
    <tr bgcolor="#0099cc">
      <td width="158" height="24"><img src="images/miss_sf_1.gif"> </td>
      </tr>
      <tr>
        <td height="46"><table width="713" border="1">
          <tr>
            <td width="169"><div align="center" class="formcaption">
              <div align="center"><strong>Nom du produit </strong></div>
            </div></td>
            <td width="152"><div align="left">
              <input name="nom" size="26" value="" class="champ" type="text" maxlength="20">
            </div></td>
            <td width="155"><div align="center" class="formcaption">
              <div align="center"><strong>Nombre de composants</strong></div>
            </div></td>
            <td width="209"><div align="center" class="formcaption">
              <div align="left">
                <div align="center" class="formcaption">
                  <div align="left">
                    <input name="nbr" size="5" value="" class="champ" type="text" maxlength="2">
                  </div>
                </div>
              </div>
            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="18" class="formcaption Style20">&nbsp;</td>
      </tr>
      <tr>
        <td height="18" class="formcaption Style20">
		<div>
		<table width="715" border="1">
          <tr>
            <td width="142">&nbsp;</td>
            <td width="134"><div align="left" class="formcaption">
              <div align="left"><strong>Impact materiaux </strong></div>
            </div></td>
            <td width="161">&nbsp;</td>
            <td width="107"><div align="center" class="formcaption">
              <div align="left">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center" class="formcaption"> <strong>R&eacute;utilisation </strong></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td width="137"><div align="left">
              <input name="reut" type="text" class="champ" value="" size="10" maxlength="5">
            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><div><span class="formcaption">
              <input name="mat" type="text" class="champ" value="" size="10" maxlength="5">
            </span></div></td>
            <td>&nbsp;</td>
            <td><div align="center" class="formcaption">
              <div align="left">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center"><strong>Recyclage</strong></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td><div align="left">
              <input name="recy" type="text" class="champ" value="" size="10" maxlength="5">
            </div></td>
          </tr>
          <tr>
            <td><div align="left"><font class="formcaption"><strong>Composant</strong></font></div></td>
            <td><div align="center" class="formcaption">
              <div align="left" class="formcaption"><strong>Impact assemblage </strong></div>
            </div></td>
            <td><div align="center" class="formcaption">
              <div align="center" class="formcaption">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center" class="Style21">Impact de fin de vie : </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><div align="center" class="formcaption">
              <div align="left">
                <input name="comp1" size="26" value="" class="champ" type="text" maxlength="20">
              </div>
            </div></td>
            <td><div><span class="formcaption">
              <input name="ass" type="text" class="champ" value="" size="10" maxlength="5">
            </span></div></td>
            <td>&nbsp;</td>
            <td><div align="center" class="formcaption">
              <div align="center" class="formcaption">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center" class="formcaption"> <strong>R&eacute;manufacturing</strong></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td><div align="left">
              <input name="rema" type="text" class="champ" value="" size="10" maxlength="5">
            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><div align="left" class="formcaption"><strong>Impact distribution </strong></div></td>
            <td>&nbsp;</td>
            <td><div align="center" class="formcaption">
              <div align="left">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center"><strong>Incin&eacute;ration</strong></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td><div align="left">
              <input name="inci" type="text" class="champ" value="" size="10" maxlength="5">
            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><div align="center" class="formcaption">
              <div align="left">
                <input name="dis" type="text" class="champ" value="" size="10" maxlength="5">
              </div>
            </div></td>
            <td>&nbsp;</td>
            <td><div align="center" class="formcaption">
              <div align="left">
                <div align="center" class="formcaption">
                  <div align="center" class="formcaption">
                    <div align="center" class="formcaption">
                      <div align="center" class="formcaption">
                        <div align="center"><strong>Enfouissement</strong></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div></td>
            <td><div align="left"><span class="formcaption">
              <input name="enfo" type="text" class="champ" value="" size="10" maxlength="5">
            </span></div></td>
          </tr>
          <tr><th colspan="5">
            <div align="left">
              <input name="button" type="button" class="input2" onClick="javascript:create_champ(2)" value="Ajouter un composant">
             </div></th>
          </tr>
        </table></td>
      </tr>
      <tr>
	   <td height="29" class="formcaption Style20">&nbsp;</td> 
 
	  </tr>
 
      <tr>
      <td height="18" class="formcaption Style20"><p>&nbsp;</p>
        <p>&nbsp;</p></td>
    </tr>
    <tr>
      <td height="18" class="formcaption Style20"> <div align="center">
                       <input name="envoi" type="image" id="Valider" value="Envoyer" src="images/bsearch.gif">  
          </p>
      </div></td>
    </tr>
    <tr bgcolor="#0099cc">
      <td height="20"><img src="images/pix.gif" height="20" width="10"></td>
      </tr>
  </tbody>
</table>
</form>
<p align="center">&nbsp;</p>
  </td>
</tr>
</tbody></table>
	</td>
	<td bgcolor="#0099cc"><img src="images/pix.gif" height="1" width="1"></td>
	<td><img src="images/pix.gif" height="1" width="10"></td>
</tr>
<tr>
	<td><img src="images/pix.gif" height="1" width="10"></td>
	<td colspan="3" valign="top">
 
	<table border="0" cellpadding="0" cellspacing="0" width="740">
	<tbody><tr>
		<td valign="bottom" width="20"><img src="images/fr_footer_coin_annu.gif" height="35" width="20"></td>
		<td align="center" bgcolor="#0099cc" width="720"><font class="linkm">
		<a href="mailto:ihsen10481@hotmail.com" class="linkm">Réclamations/Suggestions</a></font></td>
	</tr>
	</tbody></table>
	</td>
	<td><img src="images/pix.gif" height="1" width="10"></td>
</tr>
 
<tr><td colspan="5" align="center"><img src="images/pix.gif" height="3" width="1"></td></tr>
 
<tr><td height="0" colspan="5" align="center"><font> <a href="http://www.g-scop.inpg.fr/"><img src="img/img_1174574141343.JPG" width="81" height="35" border="0" align="absmiddle"></a></font></td>
</tr>
 
</tbody></table>