日期:2014-05-16 浏览次数:20396 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test2.aspx.cs" Inherits="test2" %>
<html style="height:100%" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>利用层实现伪模式窗口</title>
<script type="text/javascript">
function show() {
div1.style.display = "inline";
div2.style.display = "inline";
div1.style.width = body.clientWidth;
div1.style.height = body.clientHeight;
div2.style.top = body.clientHeight / 2 - div2.clientHeight / 2;
div2.style.left = body.clientWidth / 2 - div2.clientWidth / 2;
}
function closea() {
div1.style.display = "none";
div2.style.display = "none";
}
</script>
<style type="text/css">
.div1 {
background-color:#fff;
display:none;
position:absolute;
top:0;
left:0;
z-index:1;
filter:alpha(opacity =50);
border:4px inset red;
}
.div2 {
border:3px inset blue;
display:none;
position:absolute;
width:300px;
height:200px;
z-index:2;
&n