-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.html
34 lines (33 loc) · 1.44 KB
/
graph.html
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>
<head>
<title>Calculatrice Graphique JavaScript</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="graph.css">
</head>
<body>
<canvas id="canvas" width="1000" height="800"></canvas>
<form id="param">
Fonction :<br>
f(x) = <input id="formfx" type="text" onchange="fx=this.value;" class="fx">
<hr>
fenêtre<br>
<label for="formxmin">xmin</label><input id="formxmin" type="text" value="-2" onchange="xmin=parseInt(this.value);"><br>
<label for="formxmax">xmax</label><input id="formxmax" type="text" value="1" onchange="xmax=parseInt(this.value);"><br>
<label for="formymin">ymin</label><input id="formymin" type="text" value="-1.2" onchange="ymin=parseInt(this.value);"><br>
<label for="formymax">ymax</label><input id="formymax" type="text" value="1.2" onchange="ymax=parseInt(this.value);">
<hr>
<input type="button" value="Reinitialiser" onclick="reinit();"> <input type="button" value="1:1" onclick="ratio();">
<hr>
Canevas<br>
<label for="formlarg">largeur</label><input id="formlarg" type="text" value="1000" onchange="cwidth=parseInt(this.value);"><br>
<label for="formhaut">hauteur</label><input id="formhaut" type="text" value="800" onchange="cheight=parseInt(this.value);">
<hr>
<hr>
<input type="button" value="Calcul" onclick="draw();"><br>
<span id="disp"></span>
</form>
<div id="calc"><div id="calc2">calcul en cours...</div></div>
<script src="graph.js"></script>
</body>
</html>