Range:HTML5中的新型Input类型

<div style="100%; height:100%; position:fixed; top:0; left:0; z-index:100000; background:rgba(0,0,0,.5);"><p><input id="slider1" max="500" min="100" step="10" type="range"><input id="rangeValue1" size="2" type="text"></p></div>
<script>
function printValue(sliderID, textbox) {
var x = document.getElementById(textbox);
var y = document.getElementById(sliderID);
x.value = y.value;
}

jQuery('#slider1').change(function(){
printValue('slider1', 'rangeValue1');
});

window.onload = function() { printValue('slider1', 'rangeValue1') }

</script>

http://www.webhek.com/range

原文地址:https://www.cnblogs.com/hellman/p/4174537.html