提示框 弹出层

  1. <html xmlns="http://www.w3.org/1999/xhtml" >
  2. <head id="Head1" runat="server">
  3.     <title>弹出层</title>
  4.         <style type="text/css">
  5.     #tip
  6.     {
  7.         position: absolute;
  8.         right: 0px;
  9.         bottom: 0px;
  10.         height: 0px;
  11.         width: 180px;
  12.         border: 1px solid #D5D7CD;
  13.         background-color: #D5D7CD;
  14.         padding: 1px;
  15.         overflow: hidden;
  16.         display: none;
  17.         font-size: 12px;
  18.         z-index: 10;
  19.     }
  20.     #shadow
  21.     {
  22.         position: absolute;
  23.         width: 100%;
  24.         height: 100%;
  25.         background-color: #EAEBE6;
  26.         z-index: 11;
  27.         filter: Alpha(Opacity=70);
  28.         display: none;
  29.         overflow: hidden;
  30.     }
  31.     #detail
  32.     {
  33.         width: 500px;
  34.         height: 200px;
  35.         border: 3px double #ccc;
  36.         background-color: #FFFFFF;
  37.         position: absolute;
  38.         z-index: 30;
  39.         display: none;
  40.         left: 30%;
  41.         top: 30%;
  42.     }
  43.     </style>
  44.     <script language="javascript" type="text/javascript" >
  45.     function showwin() 
  46.     { 
  47.         document.getElementsByTagName("html")[0].style.overflow = "hidden"
  48.         document.getElementById("shadow").style.display="block"
  49.         document.getElementById("detail").style.display="block"
  50.     } 
  51.     
  52.     function recover() 
  53.     { 
  54.         document.getElementsByTagName("html")[0].style.overflow = "auto"
  55.         document.getElementById("shadow").style.display="none"
  56.         document.getElementById("detail").style.display="none"
  57.     } 
  58.     </script>
  59.     
  60. </head>
  61. <body onload="document.getElementById('tip').style.height='0px'">
  62.     <form id="form1" runat="server">
  63.         <div id="shadow">
  64.         </div>
  65.         <div id="detail">
  66.             <input id="Button2" type="button" onclick="recover()" value="关闭" />
  67.             详细内容~~!!
  68.         </div>
  69.         <div id="tip">  
  70.         </div>
  71.         <p>
  72.             <a href="#" onclick="showwin()">点击这里测试</a><br />
  73.         </p>
  74.     </form>
  75. </body>
  76. </html>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值