zoukankan      html  css  js  c++  java
  • 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);}";
  • 相关阅读:
    二、网络基础
    Ado.net
    LINQ
    C#[抽象类,接口]
    自定义类库,并引用
    c#重点[封装,继承,多肽]
    c#重点[集合类型]异常,数组,集合ArrayList,List<>,hashTable,hashtable泛型(Dictionary)
    c#重点[数据类型,构造方法,变量,变量,运算符,装箱,拆箱]
    .net reflector激活
    sqlsever备份,还原和导入导出方法
  • 原文地址:https://www.cnblogs.com/gsh0921/p/12530431.html
Copyright © 2011-2022 走看看