Spaces:
Running
Running
Codingrocks3
commited on
Commit
·
86bd250
1
Parent(s):
12d76be
Update index.html
Browse files- index.html +4 -2
index.html
CHANGED
@@ -11,16 +11,18 @@
|
|
11 |
|
12 |
<div class="slidecontainer">
|
13 |
<input type="range" min="1" max="100" value="50" class="slider" id="myRange">
|
14 |
-
<p>
|
15 |
</div>
|
16 |
|
17 |
<script>
|
18 |
var slider = document.getElementById("myRange");
|
19 |
var output = document.getElementById("demo");
|
|
|
20 |
output.innerHTML = Math.sqrt(slider.value);
|
21 |
-
|
22 |
slider.oninput = function() {
|
23 |
output.innerHTML = Math.sqrt(this.value) ;
|
|
|
24 |
}
|
25 |
</script>
|
26 |
|
|
|
11 |
|
12 |
<div class="slidecontainer">
|
13 |
<input type="range" min="1" max="100" value="50" class="slider" id="myRange">
|
14 |
+
<p>Square root of <span id="PickedNumber"> is <span id="demo"></span></p>
|
15 |
</div>
|
16 |
|
17 |
<script>
|
18 |
var slider = document.getElementById("myRange");
|
19 |
var output = document.getElementById("demo");
|
20 |
+
var output2 = document.getElementById("PickedNumber");
|
21 |
output.innerHTML = Math.sqrt(slider.value);
|
22 |
+
output2.innerHTML = slider.value;
|
23 |
slider.oninput = function() {
|
24 |
output.innerHTML = Math.sqrt(this.value) ;
|
25 |
+
output2.innerHTML = this.value;
|
26 |
}
|
27 |
</script>
|
28 |
|