JS.Events.Validation.Input.SliderImplement
function doSomething(evt) {
// this is the slider value
var val = evt.target.value;
// get the output div
var output = document.querySelector('#sliderValue');
// display the value typed in the div
output.innerHTML = "Value selected: " + val;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JavaScript slider use</title>
</head>
<body>
<h1>Simple <code><input type=range></code> field validation using the 'input' event</h1>
<p>Just move the slider</p>
<label>
1 <input type="range"
min=1
max=12
step=0.1
oninput = "doSomething(event)"> 12
</label>
<p>
<span id="sliderValue"></span>
</p>
</body>
</html>