-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
34 lines (20 loc) · 820 Bytes
/
index.html
File metadata and controls
34 lines (20 loc) · 820 Bytes
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
<!DOCTYPE html>
<html>
<body>
<script>
function calculf() {
document.getElementById("FA").value = (document.getElementById("CA").value * 9/5 ) + 32;// (document.getElementById("CA").value* 9/5 ) + 32; ; //document.getElementById("CA").value 9/5 + 32;//c1 × 9/5 * + 32; // C To F
}
function calculc() {
document.getElementById("CA").value =(document.getElementById("FA").value - 32 ) * 5/9; //( document.getElementById("FA").value − 32) × 5/9 ; // du F to C
}
</script>
<h2>Convertisseur </h2>
<label> C: </label>
<input type="number" id="CA" name="C" value="0"><br>
<label> F: </label>
<input type="number" id="FA" name="F" value="0"><br>
<button type="button" onclick="calculf()" >C TO F</button>
<button type="button" onclick="calculc()">F TO C</button>
</body>
</html>