zoukankan      html  css  js  c++  java
  • 弹出一个层屏蔽页面登录

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        
    <title>Untitled Page</title>
       
    <script language="javascript" type="text/javascript" >
      
    function StartGO()
     
    {

       
    var sWidth,sHeight; 
       sWidth
    =document.body.offsetWidth; 
       sHeight
    =screen.height;  
         
    var bgObj=document.createElement("div"); 
       bgObj.setAttribute('id','bgDiv'); 
       bgObj.style.position
    ="absolute"
       
    if(navigator.appName=="Microsoft Internet Explorer"
         bgObj.style.filter
    ="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src=/Files/xiaojiangjiang/pass.ico, sizingMethod=scale)";
       
    else
          bgObj.style.backgroundImage
    ="url(https://files.cnblogs.com/xiaojiangjiang/pass.ico)"
       bgObj.style.top
    ="0";   
       bgObj.style.opacity
    ="40%"
       bgObj.style.left
    ="0"
       bgObj.style.width
    ="100%";  
       bgObj.style.height
    =sHeight + "px"
       bgObj.style.zIndex 
    = "10000";    document.body.appendChild(bgObj);    

     
        
    var msgBox=document.createElement("div");
        msgBox.setAttribute(
    "id","msgBox1");
        msgBox.setAttribute(
    "align","center");
        msgBox.style.background
    ="white"
       msgBox.style.border
    ="1px solid buttonface";
       msgBox.style.position 
    = "absolute"
       msgBox.style.left 
    = "50%"
       msgBox.style.top 
    = "50%"
       msgBox.style.font
    ="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"
       msgBox.style.marginLeft 
    = "-225px" ; 
       msgBox.style.marginTop 
    = -75+document.documentElement.scrollTop+"px"
       
    //if(page=="write"){msgh=300;msgw=500;}
       msgBox.style.width = "250px"
       msgBox.style.height 
    ="100px";   
       msgBox.style.textAlign 
    = "center"
       msgBox.style.lineHeight 
    ="25px"
       msgBox.style.zIndex 
    = "10001";  
       
       
        
    var title=document.createElement("h4"); 
         title.setAttribute(
    "id","msgTitle"); 
         title.setAttribute(
    "align","right"); 
         title.style.margin
    ="0"
         title.style.padding
    ="3px";  
         title.style.filter
    ="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"
         title.style.opacity
    ="75%"
         title.style.background
    ="buttonface"
         title.style.border
    ="1px solid buttonface"
         title.style.height
    ="18px"
         title.style.font
    ="12px Verdana, Geneva, Arial, Helvetica, sans-serif"
         title.style.color
    ="white";
         title.style.cursor
    ="pointer"
         
    var guanbi=document.createElement("strong");
         guanbi.setAttribute(
    "id","close"); 
         guanbi.innertHTML
    ="关闭"
         title.onclick
    =function(){
            document.body.removeChild(bgObj); 
           document.body.removeChild(msgBox); 
    //       document.body.removeChild(title);
    //
           document.body.removeChild(guanbi);
         }

         title.innerHTML
    ="关闭"

         document.body.appendChild(msgBox); 
         
    var txt=document.createElement("p"); 
         txt.style.margin
    ="1em 0" 
         txt.setAttribute(
    "id","msgTxt");  
         txt.innerHTML
    ="<form method='post' action='admin/login.aspx'><table><tr><td>管理员:</td><td><input name='name' type='text' id='name' style='    border-style: none none dotted none;border- 1px;'/></td><td></td></tr><tr><td>密&nbsp;&nbsp;码:</td><td><input name='password' type='password' id='pwd'  style='    border-style: none none dotted none;border- 1px;'/></td> <td><input name='Button' type='submit' value='提交' /></td></tr></table></form>"
         document.getElementById(
    "msgBox1").appendChild(title); 
    //         document.getElementById("msgTitle").appendChild(guanbi);  
         document.getElementById("msgBox1").appendChild(txt);   
     }
     
       
    </script> 
    </head>
    <body >
        
    <div id="content">
        
    </div>
       
    <input type="button" value="OK" id="btnOK" onclick="StartGO()" /> 
    </body>
    </html>
  • 相关阅读:
    Gym 101606 F-Flipping Coins(概率dp)
    Gym101350 J Lazy Physics Cat
    Gym 101350G
    hdu6188 Duizi and Shunzi (贪心或者dp)
    Gym101350 FMonkeying Around
    codeforce 457DIV2 C题
    codeforce 457DIV2 B题
    codeforce 461DIV2 F题
    codeforce 461DIV2 E题
    PE文件RV转FOA及FOA转RVA
  • 原文地址:https://www.cnblogs.com/kingeric/p/857432.html
Copyright © 2011-2022 走看看