无刷新弹出登录窗口理论

来源:互联网 发布:什么软件可以连接宽带 编辑:程序博客网 时间:2024/05/01 21:55
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
#Layer1 {
    position:absolute;
    left:16px;
    top:19px;
    width:595px;
    height:291px;
    z-index:1;
    background-color:#333333;
    display: none
}
#Layer2 {
    position:absolute;
    left:137px;
    top:64px;
    width:358px;
    height:182px;
    z-index:2;
    background-color:#FFFFFF;
    display: none
}
-->
</style>
    <script type="text/javascript" language="javascript">
    function showlog(){
    document.getElementById("Layer1").style.display = "block";
    document.getElementById("Layer2").style.display = "block";
    }
    function hidelog(){
    document.getElementById("Layer1").style.display = "none";
    document.getElementById("Layer2").style.display = "none";
    }
    </script>
</head>

<body>

<a href="javascript:showlog()">login</a>
<div id="Layer1"></div>
<div id="Layer2">
    <a href="javascript:hidelog()">close</a>
</div>
</body>
</html>