George World

          技術改變明天,創新塑造未來! i(at)huadev.com Follow Me: http://t.sina.com.cn/georgeworld

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            28 隨筆 :: 0 文章 :: 5 評論 :: 0 Trackbacks

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ">
          <html xmlns="
          >
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
          <title>漂浮層代碼-演示</title>
          <script language="javascript" type="text/javascript">
          var suspendDivWidth = "100";  //漂浮層寬度
          var suspendDivHeight = "300";  //漂浮層高度
          var qqNumberArray = new Array("1205640864","1491012702");  //QQ號碼列表

          var lastScrollY=0;
          function heartBeat(){
              var diffY,percent;
              if (document.documentElement && document.documentElement.scrollTop){
                  diffY = document.documentElement.scrollTop;
              }
              else if (document.body){
                  diffY = document.body.scrollTop;
              }
              else{
                  /*Netscape stuff*/
              }
              percent=.1*(diffY-lastScrollY);
              if(percent>0){
                  percent=Math.ceil(percent);
              }
              else{
                  percent=Math.floor(percent);
              }
              document.getElementById("georgeFloatingLayer_Div1").style.top=parseInt(document.getElementById("georgeFloatingLayer_Div1").style.top)+percent+"px";
              document.getElementById("georgeFloatingLayer_Div2").style.top=parseInt(document.getElementById("georgeFloatingLayer_Div1").style.top)+percent+"px";
              lastScrollY=lastScrollY+percent;
          }

          //合成浮動層的內容
          function getContentOfFloatingLayer(){
              var floatingLayerContent = "";
              for (var i in qqNumberArray){
                  floatingLayerContent = floatingLayerContent + "<a target=\"_blank\" href=\"
          ><img border=\"0\" src=\" alt=\"點擊這里給我發消息\" title=\"點擊這里給我發消息\"></a><br />";
              }
              floatingLayerContent = "<fieldset id=\"georgeFloatingLayerFieldset\" style=\"-moz-border-radius:8px; text-align:center;\"><legend>在線聯系</legend>"+floatingLayerContent+"</fieldset>";
              return floatingLayerContent;
          }

          var georgeFloatingLayer_1="<DIV id=\"georgeFloatingLayer_Div1\" style='left:0;POSITION:absolute;TOP:10px;width:0;height:0;border:0px;'></div>"
          var georgeFloatingLayer_2="<DIV id=\"georgeFloatingLayer_Div2\" style='background-color:#FFFFFF;right:2px;POSITION:absolute;TOP:10px;width:"+suspendDivWidth+"px;height:"+suspendDivHeight+"px;border:0;'>"+getContentOfFloatingLayer()+"</div>";
          document.write(georgeFloatingLayer_1);
          document.write(georgeFloatingLayer_2);

          window.setInterval("heartBeat()",1);
          </script>
          </head>

          <body>
          <div style="height:900px; background-color:#FF0000; border:solid #3399FF 1px;">ffffffffffff</div>
          </body>
          </html>


          評論

          # 騰飛數據 2011-01-25 23:53 選擇騰飛-復制成功
          選擇騰飛-復制成功  回復  更多評論
            

          # re: 網頁QQ聊天按鈕-漂浮層中的QQ在線狀態 2011-09-09 18:50 終極網絡
          很好  回復  更多評論
            

          # re: 網頁QQ聊天按鈕-漂浮層中的QQ在線狀態 2014-07-11 09:33 覃起亮
          就像弄個好看的代碼發到網頁中  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 阿尔山市| 紫云| 红河县| 子长县| 丹凤县| 蒙山县| 鲜城| 故城县| 丰城市| 丹江口市| 南康市| 水城县| 比如县| 江城| 页游| 莲花县| 木兰县| 大城县| 华池县| 开阳县| 芦溪县| 南皮县| 彰化市| 嘉峪关市| 嵩明县| 湖南省| 杭锦后旗| 馆陶县| 离岛区| 长沙县| 甘德县| 富阳市| 阳山县| 通辽市| 津市市| 辽中县| 东阿县| 马关县| 金秀| 榆树市| 肇源县|