zoukankan      html  css  js  c++  java
  • 加载时添加一个遮罩层

    js代码

    <script type="text/javascript">

    $(function() {
    var left = $(document).width() / 2 - 300 / 2;
    $(".zzc").css("margin-left", left);
    $(".zzc").css("margin-top", 50);

    $(".zzcMain").css("width", $(document).width());
    $(".zzcMain").css("height", $(document).height());
    });
    </script>

    css代码:

    <style type="text/css">

    .zzcMain {
    position: fixed;
    display: none;
    }

    .zzc {
    140px;
    height: 33px;
    border: 0px solid gray;
    position: fixed;
    }

    .zzc>span {
    color: blue;
    font-size: 14px;
    line-height: 35px;
    }

    </style>

    body中添加的html代码:

    <div class="zzcMain">
    <div class="zzc">
    <i class="fa fa-2x fa-spinner fa-spin"></i>&nbsp;<span>正在查询,请稍候...</span>
    </div>
    </div>

    持行提交表单时的js代码:

    function pFn(tjrq) {
    $(".zzcMain").show();
    $("#tjrqForm").submit();
    }

  • 相关阅读:
    Map和Set
    js基本语法入门
    js中变量的作用域,let,const详解
    循环结构
    方法
    只有分享才能一起进步
    培训随笔
    得食相呼,义也
    Wall.e
    《国学之大智慧》观感
  • 原文地址:https://www.cnblogs.com/rdchen/p/11136558.html
Copyright © 2011-2022 走看看