• [转]创建一个JavaScript弹出DIV窗口层的效果


    转自:https://www.cnblogs.com/freeliver54/p/4920388.html

     1 <!doctype html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <title>Document</title>
     6     <style>
     7 #popupcontent{ 
     8 position: absolute; 
     9 visibility: hidden; 
    10 overflow: hidden; 
    11 border:1px solid #CCC; 
    12 background-color:#F9F9F9; 
    13 border:1px solid #333; 
    14 padding:5px; 
    15 } 
    16     </style>
    17     <script>
    18 var baseText = null; 
    19 
    20 function showPopup(w,h){ 
    21 var popUp = document.getElementById("popupcontent"); 
    22 popUp.style.top = "150px"; 
    23 popUp.style.left = "150px"; 
    24 popUp.style.width = w + "px"; 
    25 popUp.style.height = h + "px"; 
    26 //if (baseText == null) baseText = popUp.innerHTML; 
    27 //popUp.innerHTML = baseText + "<div id="statusbar"><button onclick="hidePopup();">Close window</button></div>"; 
    28 //var sbar = document.getElementById("statusbar"); 
    29 //sbar.style.marginTop = (parseInt(h)-40) + "px"; 
    30 popUp.style.visibility = "visible"; 
    31 } 
    32 
    33 function hidePopup(){ 
    34 var popUp = document.getElementById("popupcontent"); 
    35 popUp.style.visibility = "hidden"; 
    36 } 
    37 
    38 
    39     </script>
    40 </head>
    41 <body>
    42     <a href="#" onclick="showPopup(600,600);" >Open popup</a> 
    43     <div id="popupcontent">这是一个DIV弹窗效果!相关内容如下
    44     <iframe src="Agree.html" width="500px" height="500px;" scroll="auto"></iframe>
    45     <div id="statusbar"><button onclick="hidePopup();">Close window</button></div>
    46     </div>
    47     
    48 </body>
    49 </html>
  • 相关阅读:
    一个java的进销存管理系统源码阅读
    嵌入式起步
    java数据库操作有关的杂记
    VS 调试
    软件测试的原则
    黑盒测试与白盒测试
    Xmind快速入门(基本操作够用了)
    opt目录
    日志测试
    bug的前世今生
  • 原文地址:https://www.cnblogs.com/sharpest/p/10142502.html
Copyright © 2020-2023  润新知