zoukankan      html  css  js  c++  java
  • js实现 弹出div 并且使本页变淡,不可编辑

    // JScript 文件

           function sAlert(str)
            {
            var msgw,msgh,bordercolor;
            msgw=400;//提示窗口的宽度
            msgh=100;//提示窗口的高度
            titleheight=25 //提示窗口标题高度
            bordercolor="#c51100";//提示窗口的边框颜色
            titlecolor="#c51100";//提示窗口的标题颜色
           
            var sWidth,sHeight;
            sWidth=screen.width;//屏幕宽
            sHeight=screen.height;//屏幕高

            var bgObj=document.createElement("div");
            bgObj.setAttribute('id','bgDiv');
            bgObj.style.position="absolute";
            bgObj.style.top="0";
            bgObj.style.background="#cccccc";
            bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75)";
            bgObj.style.opacity="0.6";
            bgObj.style.left="0";
            bgObj.style.width=sWidth + "px";
            bgObj.style.height=sHeight + "px";
            bgObj.style.zIndex = "100";
            document.body.appendChild(bgObj);
            var msgObj=document.getElementById("div1");
            msgObj.style.display = "block";
            }
           
           
            function guanbi()
            {
               var bgObj=document.getElementById("bgDiv");
               document.body.removeChild(bgObj);
              
               var msgObj=document.getElementById("div1");
               msgObj.style.display = "none";
            }

  • 相关阅读:
    vue中倒计时的用法
    ant.design 中各种问题
    vue-cli3.0跨域代理问题
    vue-cli3.0配置多页面应用
    vue-axios中post和get携带参数和token
    后台返回的时间戳转化为前端的日期
    微信与支付宝二维码在页面中的使用
    git梗概介绍
    键盘和鼠标事件的区别和使用
    vue.js学习笔记(5)— Vue路由传参
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090625.html
Copyright © 2011-2022 走看看