-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
33 lines (32 loc) · 1018 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="plot.css">
<title></title>
</head>
<body>
<canvas id="xy-graph" width="535" height="300">
CANVAS NOT SUPPORTED IN THIS BROWSER!
</canvas>
<br />
<br />
<input type="range" min="-10" max="10" value="1" step="0.25" class="slider" id="wx">
<span id="wx-out">wx: 1</span>
<input type="range" min="-10" max="10" value="0" step="0.25" class="slider" id="b">
<span id="b-out">b: 0</span>
<script type="text/javascript" src="plot.js"></script>
<script>
function initSliders(){
let wx = document.getElementById('wx')
let b = document.getElementById('b')
wx.addEventListener('input', () => {
document.getElementById('wx-out').innerHTML = 'wx: ' + wx.value
})
b.addEventListener('input', () => {
document.getElementById('b-out').innerHTML = 'b: ' + b.value
})
}
initSliders();
</script>
</body>
</html>