type类型为range的input标签,value值改变随即执⾏的事件当改变range的value值时,不⽤松开⿏标就能触发改变事件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
img{
width: 200px;
}
</style>
</head>
<body>
<script src="js/jquery.min.js"></script>
<input id="size" type="range" max="1000" min="100" value="100" step="50" />
<p>
<img src="img/timg.jpg" id="pic"/>
</p>
<script type="text/javascript">
$('#size').on('input propertychange',function(){
$('#pic').css('width',$('#size').val() + 'px');
})
</script>
</body>html input type属性
</html>