我如何在滑块的两侧添加文字,上面写着“非常同意”和“非常不同意”?
非常感谢 :)
我的代码是:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><font color="black">Right now I feel: Attentive</p>
<div class="slidecontainer">
<input type="range" min="0" max="100" value="50" step="0.01" class="slider" id="myRange">
<p><font color="black">Value: <span id="demo"></span></p>
</div>
<script>
var slider1 = document.getElementById("myRange");
var output = document.getElementById("demo");
output.innerHTML = slider1.value;
slider1.oninput = function() {
output.innerHTML = this.value;
}
</script>
相关分类