zoukankan      html  css  js  c++  java
  • 项目需要简单些了个WEB APP 的弹出窗

    var diag = {
        
        showDlg:'',//需要显示的DIV
        rushdiv:"<div id=v style='top:0;position: absolute;z-index:99;background: #000;display:none;opacity:0.5;'></div>",
        digId:0,
        init:function(){
            $(document.body).append(diag.rushdiv); 
            var bdw = $("body").width();
        
            var bdh = document.body.scrollHeight
            $("#v").css("width",bdw);
            $("#v").css("height",bdh);
    
        },
        run:function(json){
            
            //先打开遮罩层
            
            diag.init();
            diag.digId = json.digId;
            $("#"+diag.digId).css("top",document.body.scrollTop);
            $("#"+diag.digId).css("z-index",100);
            $("#"+diag.digId).css("position",'absolute');
            
            $("#"+diag.digId).show();
            $("#v").show();
            
        },
        close:function(){
            $("#"+diag.digId).hide();
            $("#v").hide();
        }
    
    }

    用法

    <div id="addhybox" style=" display:none;100%;height:200px;background: #fff;">
     <div style="background: #07c2ff;100%;height:60px;"><span id="closeDiaLog" style="float:right;margin-right:10px;color:#fff"><img src="__PUBLIC__/Msw/images/sc-icon.png" style="30px;height:30px"></span></div>
     
        
        <div style="float:left;40%;">
            <input type="file" capture="camera" accept="image/*" id="cameraInput" name="cameraInput" >
        </div>
        <div style="float:left;20%;"><img id="imgprv" data-b64="" style="120px;height:120px"></div>
        <div style="float:right;20%;padding-left:30px;padding-top:30px;"><img id="ok" src="__PUBLIC__/Msw/images/cg-icon.png" style="40px;height:40px"></div>
    
    
    </div>
  • 相关阅读:
    mysql5.7 安装及主从搭建
    虚拟机加硬盘做逻辑卷
    mysql 5.7 主从同步问题
    Tomcat 配置全球服务器证书
    新建linux 服务器初始化配置
    python 字典 元组 集合
    python 列表
    35.再谈SpringBoot自定义日志配置--LogBack.xml
    36.SpringBoot应用属性加载和自动配置@EnableAutoConfiguration
    37.再谈Spring Boot Actuator
  • 原文地址:https://www.cnblogs.com/cfas/p/5461645.html
Copyright © 2011-2022 走看看