网络编程 
首页 > 网络编程 > 浏览文章

jQuery实现的支持IE的html滑动条

(编辑:jimmy 日期: 2025/12/27 浏览:3 次 )

复制代码 代码如下:
<html>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js"> <style>
.d_b{
    height: 20px;
    width: 10px;
    display: inline-block;
    background-color: black;
    position: relative;
    vertical-align: middle;
    top: -15px;
    left: -5px;
}
</style>
<div id="d" style="width:200px;cursor: pointer;" max=100 min=0 value=10 >
<div style="height:10px; width:100%; background-color:green" ></div>
<b class="d_b"></b>
</div>
<b id="text"></b>
<script>
var $dom = $(document);
$dom.on('mousedown','#d',function (argument) {
    $(this).data('mouse','down');
    console.log('down');
})
$dom.on('mouseup',function(){
    $('#d').data('mouse','up');
    console.log('up');
});
$dom.on('mousemove','#d',function(event){
    if($(this).data('mouse') == 'down'){
        var m_x = event.clientX;
        var d_b = $(this).find('.d_b');
        m_x = m_x < 8 "" src="/UploadFiles/2021-04-02/2015031611021614.png">

以上就是本文的全部内容了,希望能够对大家学习使用jQuery有所帮助。

上一篇:JavaScript中消除闭包的一般方法介绍
下一篇:JavaScript计算两个日期时间段内日期的方法
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。