• web Form进度条


    Css

            /*进度条*/
            .box {
                position: relative;
                width: 210px;
                height: 50px;
                border: 1px solid #fffdfd;
                margin: 0 0 0 0;
            }
    
            .bg {
                height: 10px;
                margin-top: 19px;
                border: 1px solid #ddd;
                border-radius: 5px;
                overflow: hidden;
            }
    
            .bgcolor {
                background: #5889B2;
                width: 0;
                height: 10px;
                border-radius: 5px;
            }
    
            .bt {
                width: 24px;
                height: 24px;
                background-color: #494990;
                border-radius: 17px;
                overflow: hidden;
                position: absolute;
                left: 0px;
                margin-left: -11px;
                top: 12px;
                cursor: pointer;
            }
    
            .text {
                width: 210px;
                margin: 0 auto;
                font-size: 16px;
                line-height: 2em;
            }
            /*进度条*/

    aspx

      <div class="box" id="box1">
                                                            <div class="bg" id="bg1">
                                                                <div class="bgcolor" id="bgcolor1"></div>
                                                            </div>
                                                            <div class="bt" id="bt1"></div>
                                                        </div>
    //进度条
            (function ($) {
                var $box = $('#box1');
                var $bg = $('#bg1');
                var $bgcolor = $('#bgcolor1');
                var $btn = $('#bt1');
                var $numAuditPriceScore = $('#ctl00_CH_rp2_numAuditPriceScore_I');
                var statu = false;
                var ox = 0;
                var lx = 0;
                var left = 0;
                var bgleft = 0;
                $btn.mousedown(function (e) {
                    lx = $btn.offset().left;
                    ox = e.pageX - left;
                    statu = true;
                });
                $(document).mouseup(function () {
                    statu = false;
                });
                $box.mousemove(function (e) {
                    if (statu) {
                        left = e.pageX - ox;
                        if (left < 0) {
                            left = 0;
                        }
                        if (left > 200) {
                            left = 200;
                        }
                        $btn.css('left', left);
                        $bgcolor.width(left);
                        $numAuditPriceScore.val(parseInt(left / 2));
                    }
                });
                $bg.click(function (e) {
                    if (!statu) {
                        bgleft = $bg.offset().left;
                        left = e.pageX - bgleft;
                        if (left < 0) {
                            left = 0;
                        }
                        if (left > 200) {
                            left = 200;
                        }
                        $btn.css('left', left);
                        $bgcolor.stop().animate({  left }, 200);
                        $numAuditPriceScore.val(parseInt(left / 2));
                    }
                });
            })(jQuery);

     后台绑定:

       numAuditPriceScore.ClientSideEvents.LostFocus = "function(s,e){  var AuditPriceScore = $('#ctl00_CH_rp2_numAuditPriceScore_I').val(); $('#bt1').css('left', parseInt(AuditPriceScore * 2));$('#bgcolor1').stop().animate({  parseInt(AuditPriceScore * 2) }, 200);}";
  • 相关阅读:
    关于软件工程是不是教那些不会写程序的人开发软件的一些看法。
    学习这门课的一些问题
    软件测试的平台
    课程上不明白的问题
    目前流行的源程序版本管理软件和项目管理软件都有哪些, 各有什么优缺点?
    自我介绍
    【软件工程】提问回顾与个人总结
    Google Kick Start 2019 C轮 第一题 Wiggle Walk 题解
    elasticsearch-py 解决 too_long_frame_exception 问题
    Redis集群学习笔记
  • 原文地址:https://www.cnblogs.com/gsh0921/p/12530431.html
Copyright © 2020-2023  润新知