<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    HelloWorld 善戰(zhàn)者,求之于勢,不責(zé)于人;故能擇人而任勢。

    知止而后有定,定而后能靜,靜而后能安,安而后能慮,慮而后能得。物有本末,事有終始。知所先后,則近道矣。

      BlogJava :: 首頁 ::  :: 聯(lián)系 ::  :: 管理 ::
      167 隨筆 :: 1 文章 :: 40 評論 :: 0 Trackbacks

    /**
    * 功能: 仿Msn信息提示
    * @param height : 信息框的高度
    * @param width : 信息框的寬度
    * @param title : 信息框的標(biāo)題
    * @param innerHTML : 信息框面板顯示內(nèi)容,放在<DIV></DIV>中,任意的HTML代碼
    * @return void
    */
    function CMsnMsg(width,height,title,innerHTML) {
    this.height = (height!=null)?height:150;
    this.width = (width!=null)?width:200;
    this.title = title;
    this.innerHTML = innerHTML;
    //以下為默認(rèn)值設(shè)置,可以調(diào)用對象的成員直接修改
    //信息框默認(rèn)為自動隱藏
    this.autoHide = true;
    //信息框右邊的x坐標(biāo)
    this.right = screen.width - 2;
    //信息框的左部x坐標(biāo)
    this.left = this.right - this.width;
    //信息框的底部y坐標(biāo)
    this.bottom = screen.height;
    //信息框的頂部的y坐標(biāo)
    this.top = this.bottom - this.height;
    //默認(rèn)為沒有關(guān)閉
    this.close = false;
    //默認(rèn)為沒有停止不動
    this.pause = false;
    //信息框移動速度
    this.speed = 15;
    //正常顯示需要多久的時間,然后關(guān)閉掉
    this.timeout = 300;
    //設(shè)置步長
    this.step = 1;
    //定時器
    this.timer = 0;
    }

    /**
    * CMsnMsg對象的顯示方法
    */
    CMsnMsg.prototype.show = function() {
    var pop = window.createPopup();
    this.pop = pop;
          var str = "<DIV style='BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: "
          str +=this.width + "px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: " + this.height + "px; BACKGROUND-COLOR: #c9d3f3'>"  
          str += "<TABLE style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#cfdef4 border=0>"  
          str += "<TR>"  
          str += "<TD style='FONT-SIZE: 12px;COLOR: #0f2c8c' width=30 height=24></TD>"  
          str += "<TD style='PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px' vAlign=center width='100%'>" + this.title + "</TD>"  
          str += "<TD style='PADDING-RIGHT: 2px; PADDING-TOP: 2px' vAlign=center align=right width=19>"  
          str += "<SPAN title=關(guān)閉 style='FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: black; MARGIN-RIGHT: 4px' id='btSysClose' >×</SPAN></TD>"  
          str += "</TR>"  
          str += "<TR>"  
          str += "<TD style='PADDING-RIGHT: 1px;PADDING-BOTTOM: 1px' colSpan=3 height=" + (this.height-28) + ">"  
          str += "<DIV style='BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; PADDING-BOTTOM: 8px;";
          str += "BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 8px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%'>"  
    str += this.innerHTML;
          str += "</DIV>"  
          str += "</TD>"  
          str += "</TR>"  
          str += "</TABLE>"  
          str += "</DIV>"  
          pop.document.body.innerHTML = str;
          this.offset = 0;
          var me = this;
          pop.document.body.onmouseover = function() {me.pause = true;};
          pop.document.body.onmouseout = function() {me.pause = false;};
        
          var fun = function() {
           var x = me.left;
           var y = 0;
           var width = me.width;
           var height = me.height;
           if (me.offset > me.height) {
            height = me.height;
           } else {
            height = me.offset;
           }
           y = me.bottom - me.offset;
        if (y <= me.top) {
         me.timeout -= 1;
         if (me.timeout == 0) {
          window.clearInterval(me.timer);
          if (me.autoHide) {
           me.hide();
          }
         }
        } else {
         me.offset += me.step;
        }
        me.pop.show(x,y,width,height);
          }    
          this.timer = window.setInterval(fun,this.speed);
          var btClose = pop.document.getElementById("btSysClose");
          btClose.onclick = function(){  
              me.close = true;
              me.hide();
          }
    }
    /**
    * CMsnMsg對象的關(guān)閉方法
    */
    CMsnMsg.prototype.hide = function() {
    flag = true;
    var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top;
    var me = this;
    if(this.timer > 0){  
        window.clearInterval(me.timer);
          }
          var fun = function() {
           if (!me.pause || me.close) {
            var x = me.left;
            var y = 0;
            var width = me.width;
            var height = 0;
            if (me.offset > 0) {
             height = me.offset;
            }
            y = me.bottom - height;
            if (y >= me.bottom) {
             window.clearInterval(me.timer);  
             me.pop.hide();
            } else {
             me.offset -= me.step;
            }
            me.pop.show(x,y,width,height);
           }     
          }
          this.timer = window.setInterval(fun,this.speed);
    }
    var msg = null;
    function test() {
    if (msg == null || !msg.pause) {
         msg = new CMsnMsg(300,220,"ABM系統(tǒng)提示");
         msg.innerHTML = "<A href='www.baidu.com'>www.baidu.com</a>"
         msg.show();
    }
    }
    window.setInterval("test();",20000);



    </script>

    posted on 2007-08-13 18:42 helloworld2008 閱讀(367) 評論(0)  編輯  收藏 所屬分類: html/javascript/css
    主站蜘蛛池模板: 99精品视频在线观看免费专区 | 亚洲精品字幕在线观看| 国色精品卡一卡2卡3卡4卡免费| 国产精品成人啪精品视频免费| 亚洲中文无码亚洲人成影院| 亚洲国产老鸭窝一区二区三区| 亚洲精品无码专区2| 女人18毛片a级毛片免费| 亚洲视频免费在线观看| 国产精品成人啪精品视频免费| 国产成人亚洲综合无| 亚洲国产精品嫩草影院| 亚洲H在线播放在线观看H| 99久久精品国产亚洲| 亚洲产国偷V产偷V自拍色戒| 亚洲一区二区高清| 免费v片视频在线观看视频| 成人a视频片在线观看免费| 国产精品久久久久久久久免费| 国产va在线观看免费| 免费一区二区三区| 中文字幕在线免费看| 中文字幕无线码免费人妻| 日本一区二区三区免费高清在线 | 最刺激黄a大片免费网站| 99re6在线视频精品免费| 成年免费大片黄在线观看com| 噜噜综合亚洲AV中文无码| 亚洲精品色在线网站| 亚洲AV无码专区亚洲AV桃| 老司机亚洲精品影院在线观看| 亚洲日本VA中文字幕久久道具| 亚洲人成免费网站| 亚洲成a人片在线观看精品| 亚洲丝袜中文字幕| 亚洲一区二区三区四区视频| 亚洲日本人成中文字幕| 99999久久久久久亚洲| 亚洲日韩中文字幕无码一区| 亚洲精品无码久久久久A片苍井空| 亚洲色大成网站www久久九|