div鼠标点击滚动条,这种用js如何写,请高手们给个实例。多谢。
发布网友
发布时间:2022-05-11 22:35
我来回答
共3个回答
热心网友
时间:2022-05-17 23:38
用到了Jquery的ui组件。
组件可以到网络上下载
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Slider - Default functionality</title>
<link type="text/css" href="theme/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="ui/jquery.ui.slider.js"></script>
<style type="text/css">
#demo-frame > div.demo { padding: 10px !important; }
</style>
<script type="text/javascript">
$(function() {
$("#slider").slider();
});
</script>
</head>
<body>
<div class="demo">
<div id="slider"></div>
</div><!-- End demo -->
<div class="demo-description">
<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p>
</div><!-- End demo-description -->
</body>
</html>
热心网友
时间:2022-05-18 00:56
jquery.ui控件