Range:HTML5中的新型Input类型

<div style="width: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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。