Bonjour, je ne comprends pourquoi le code ci-dessous me renvoie "NaN"
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 <script type="text/javascript"> var columnID_1_calc = "4.6"; var column_lenght_1_calc = "150"; var Eps_calc = "0.7"; var columnID_1_calc2 = columnID_1_calc.replace( ',' , '.' ); var columnID_1_calc3 = parseFloat(columnID_1_calc2,10); var column_lenght_1_calc2 = column_lenght_1_calc.replace( ',' , '.' ); var column_lenght_1_calc3 = parseFloat(column_lenght_1_calc2,10); var Eps_calc2 = Eps_calc.replace( ',' , '.' ); var Eps_calc3 = parseFloat(Eps_calc2,10); function calcul_dead_volume1 (columnID_1_calc3,column_lenght_1_calc3,Eps_calc3) { // calcul du Dead Volume dead_volum1_calc = Math.pow(columnID_1_calc3,2)*3.14*column_lenght_1_calc3/4*Eps_calc3; dead_volum1_calc2 = Math.round (dead_volum1_calc); dead_volum1_calc3 = parseFloat(dead_volum1_calc2,10); return (dead_volum1_calc3); } alert (calcul_dead_volume1()); </script>
Partager