首页 > Web开发 > 详细

Range:HTML5中的新型Input类型

时间:2014-12-19 18:54:17      阅读:161      评论:0      收藏:0      [点我收藏+]

<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

Range:HTML5中的新型Input类型

原文:http://www.cnblogs.com/hellman/p/4174537.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!