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";
            }

  • 相关阅读:
    WCF 无法生成 client
    Powershell profile.ps1 cannot be loaded because its operation is blocked by software restriction policies
    信步拾遗之Windwos Live Writer插件
    Maven setting.xml文件详解(转)
    Maven pom.xml详解(转)
    信步漫谈之Maven—基础介绍
    信步漫谈之Nginx—负载均衡
    信步漫谈之Hibernate—基础介绍
    信步漫谈之Dom4j—基础介绍
    信步拾遗之CHM开源文档制作
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090625.html
Copyright © 2011-2022 走看看