当改变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>