Le code suivant :
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>devis4</title>
</head>
<body>
<br>
<br>
<br>
<br>
<br>
<script language="javascript" type="text/javascript">
 
 
 
 
function calc_sous_total(prix, qte, type)
{
    sous_total=prix*qte;
    document.getElementById("total_"+type).value=sous_total;
 
    calc_total();
}
 
function calc_total()
{   total_fr = (document.getElementById("total_fr").value!="") ? document.getElementById("total_fr").value : 0;
	total_npn = (document.getElementById("total_npn").value!="") ? document.getElementById("total_npn").value : 0;
	total_npa = (document.getElementById("total_npa").value!="") ? document.getElementById("total_npa").value : 0;
	total_d = (document.getElementById("total_d").value!="") ? d=document.getElementById("total_d").value : 0;
	total=parseFloat(parseFloat(total_fr,10)+parseFloat(total_npn,10)+parseFloat(total_npa,10)+parseFloat(total_d,10));
 
    document.getElementById("total").value=total;
}
 
 
</script>
<script language="javascript" type="text/javascript">
total=0;
</script>
 
<form action="" name="form" method="post">
 <table bgcolor="C596FF">
    <tbody>
      <tr>
        <td colspan="4" bgcolor="black"><font
 color="white" face="Arial">Remplissez les champs
utiles</font> </td>
      </tr>
      <tr bgcolor="grey">
        <td><font color="white" face="Arial">1-
Tarif de base</font></td>
        <td><font color="white" face="Arial">Prix
unitaire</font></td>
        <td><font color="white" face="Arial">Quantit&eacute;</font></td>
        <td><font color="white" face="Arial">Total</font></td>
      </tr>
      <tr>
        <td><font color="white" face="Arial"
 size="2">Frais
de r&eacute;alisation (gratuit) :</font></td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10" name="px_fr"
 value="0" type="text" disabled="disabled">&euro;</td>
              <td width="40"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="50"></td>
              <td><input size="2" maxlength="10" name="q_fr"
 value="1" type="text" disabled="disabled"></td>
              <td width="50"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10" name="total_fr"
 value="0" type="text"></td>
              <td width="40">&euro;</td>
            </tr>
          </tbody>
        </table>
        </td>
      </tr>
      <tr bgcolor="grey">
        <td><font color="white" face="Arial">2-
Vos choix</font></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
     <tr>
        <td><font color="white" face="Arial"
 size="2">Nombres
de photos numériques :</font></td>
        <td>	
 <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="0.9" name="px_npn" type="text" disabled="disabled">&euro;</td>
              <td width="40"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="50"></td>
              <td><input size="2" maxlength="10"
 value="" name="q_npn" id="q_npn" type="text" onkeyup="calc_sous_total(px_npn.value, this.value, 'npn')"></td>
              <td width="50"></td>
            </tr>
          </tbody>
        </table>		
 
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="0" name="total_npn" id="total_npn"  type="text"></td>
              <td width="40">&euro;</td>
            </tr>
          </tbody>
        </table>
        </td>
 
      </tr>
      <tr>
        <td><font color="white" face="Arial"
 size="2">Nombres
de photos argentiques (papier) :</font></td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="1.1" name="px_npa" type="text" disabled="disabled">&euro;</td>
              <td width="40"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="50"></td>
              <td><input size="2" maxlength="10"
 value="" name="q_npa" id="q_npa" type="text" onkeyup="calc_sous_total(px_npa.value, this.value, 'npa')"></td>
              <td width="50"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="0" name="total_npa" id="total_npa"  type="text"></td>
              <td width="40">&euro;</td>
            </tr>
          </tbody>
        </table>
        </td>
 
      </tr>
      <tr>
        <td><font color="white" face="Arial"
 size="2">Nombres
de diapositives
:</font></td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="2.0" name="px_d" type="text" disabled="disabled">&euro;</td>
              <td width="40"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="50"></td>
              <td><input size="2" maxlength="10"
 value="" name="q_d" id="q_d" type="text" onkeyup="calc_sous_total(px_d.value, this.value, 'd')"></td>
              <td width="50"></td>
            </tr>
          </tbody>
        </table>
        </td>
        <td>
        <table>
          <tbody>
            <tr>
              <td width="40"></td>
              <td><input size="5" maxlength="10"
 value="0" name="total_d" id="total_d" type="text" ></td>
              <td width="40">&euro;</td>
            </tr>
          </tbody>
        </table>
        </td>
      </tr>
	  <tr bgcolor=grey><td></td><td></td><td>Total (TTC)</td> <td><input size="5" maxlength="10" value="0"
 name="total" id="total" type="text"></td></tr>
    </tbody>
</td></tr>  </table>
  <br>
  <br>
 
</form>
 
 
</body>
</html>
marche sous IE mais pas sous FF. En gros, c'est pour faire un devis (Ce n'est qu'un essai ; ce n'est pas fini). Que faut-il faire pour que ça marche ?