显示与隐藏

<!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;
    width:200px;
    height:115px;
    z-index:1;
    left: 1126px;
    top: 134px;
}
#Layer2 {
    position:absolute;
    width:35px;
    height:16px;
    z-index:2;
    left: 1287px;
    top: 138px;
}
#Layer3 {
    position:absolute;
    width:33px;
    height:24px;
    z-index:3;
    left: 1292px;
    top: 210px;
}
-->
</style>
<script type="text/javascript">
function OnlineUp()
{
 document.getElementById("Layer1").style.display="none";
 document.getElementById("Layer2").style.display="none";
 document.getElementById("Layer3").style.display="block";
}
function OnlineDown()
{
 document.getElementById("Layer1").style.display="block";
 document.getElementById("Layer2").style.display="block";
 document.getElementById("Layer3").style.display="none";
}
</script>
</head>

<body>
<div id="Layer1" style=" background-image:url(广告窗口/可展开滚动的QQ客服代码/images/qq/qq_1.png)"></div>
<div id="Layer2" onclick="OnlineUp()">关闭</div>
<div id="Layer3" onclick="OnlineDown()">打开</div>
</body>
</html>

 

posted on 2012-06-04 17:38  端着咖啡码农  阅读(146)  评论(0编辑  收藏  举报