網頁右下角的信息框


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>網頁右下角的信息框</title>
</head>
<style type="text/css">
#winpop { width:200px; height:0px; position:absolute; right:0; bottom:0; border:1px solid #666; margin:0; padding:1px;

overflow:hidden; display:none;}
#winpop .title { width:100%; height:22px; line-height:20px; background:#FFCC00; font-weight:bold; text-align:center; font-

size:12px;}
#winpop .con { width:200px; height:90px; line-height:20px; font-weight:bold; font-size:12px; color:#FF0000; text-

decoration:underline; text-align:left; word-break:break-all;}

.close { position:absolute; right:4px; top:-1px; color:gray; cursor:pointer}
</style>
<script type="text/javascript">
function mouseOver() {
            var MsgPop = document.getElementById("winpop");
            MsgPop.style.display = "block"; //顯示隱藏的窗口
            clearInterval(show);
        }
        function mouseOut() {
            show = setTimeout("changeH('down')", 6000);//鼠標移開6秒後自動隱藏
        }
        function tips_pop() {
            var MsgPop = document.getElementById("winpop");
            var popH = parseInt(MsgPop.style.height);//將對象的高度轉化爲數字
            if (popH <= 0) {
                MsgPop.style.height = (popH + 104).toString() + "px";
                MsgPop.style.display = "block"; //顯示隱藏的窗口
                show = setTimeout("changeH('down')", 6000);
            }
        }

        function changeH(str) {
            var MsgPop = document.getElementById("winpop");
            var popH = parseInt(MsgPop.style.height);
            if (str == "down") {
                if (popH > 0) {
                    MsgPop.style.height = (popH - 104).toString() + "px";
                    MsgPop.style.display = "none"; //隱藏DIV
                }
            }
        }
        window.onload = function() { //加載
            document.getElementById('winpop').style.height = '0px';
            setTimeout("tips_pop()", 500);//0.5秒後調用tips_pop()這個函數
        }
</script>
<body>

<div id="winpop" onmouseover="mouseOver()" onmouseout="mouseOut()">
 <div class="title">重要提示!<span class="close" onclick="tips_pop()">×</span></div>
    <div class="con">&nbsp;&nbsp;&nbsp;&nbsp;由於歷史賬期省分數據重傳、明細替換等原因,自助分析工具展示的2012年部分數據與數據分析系統頁面數據存在差異。請知悉!</div>
</div>

<!--下面只是說明與程序代碼無關-->
</body>
</html>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章