this is a simple realization of mask. the code as below:
- <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <title> New Document </title>
- <meta name="Generator" content="EditPlus">
- <meta name="Author" content="">
- <meta name="Keywords" content="">
- <meta name="Description" content="">
- <style type="text/css">
- #mask {
- position: absolute;
- visibility: hidden;
- background: #000;
- z-index: 99999;
- left: 0px;
- top: 0px;
- filter: alpha(opacity=80);
- text-align: center;
- }
- </style>
- <script type="text/javascript">
- var o;
- function showMask() {
- o = document.getElementById("mask");
- o.style.visibility = "visible";
- o.style.height = window.screen.availHeight;
- o.style.width = window.screen.availWidth;
- }
- function closeMask() {
- o = document.getElementById("mask");
- o.style.visibility = "hidden";
- }
- </script>
- </head>
- <body>
- <div id="mask"><input type="button" value="close" onclick="closeMask()" /></div>
- <input type="button" value="showMask" onclick="showMask()" />
- </body>
- </html>