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

  • 相关阅读:
    Delphi接口的底层实现
    Delphi实现图像文本旋转特效完整代码
    delphi 原创应用工具箱
    用Delphi制作DLL
    Delphi在StatusBar上绘制ProgressBar
    Delphi之TDrawGrid绘制
    基于Delphi的接口编程入门
    Delphi中For In 语法应用实例
    w3c与微软(IE)事件注册区别 -Tom
    js 函数-Tom
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090625.html
Copyright © 2011-2022 走看看