项目需要简单些了个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;width:100%;height:200px;background: #fff;">
 <div style="background: #07c2ff;width:100%;height:60px;"><span id="closeDiaLog" style="float:right;margin-right:10px;color:#fff"><img src="__PUBLIC__/Msw/images/sc-icon.png" style="width:30px;height:30px"></span></div>
 
    
    <div style="float:left;width:40%;">
        <input type="file" capture="camera" accept="image/*" id="cameraInput" name="cameraInput" >
    </div>
    <div style="float:left;width:20%;"><img id="imgprv" data-b64="" style="width:120px;height:120px"></div>
    <div style="float:right;width:20%;padding-left:30px;padding-top:30px;"><img id="ok" src="__PUBLIC__/Msw/images/cg-icon.png" style="width:40px;height:40px"></div>


</div>
复制代码

 

posted @   方东信  阅读(291)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示