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

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

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

    隨筆 - 154  文章 - 60  trackbacks - 0
    <2007年12月>
    2526272829301
    2345678
    9101112131415
    16171819202122
    23242526272829
    303112345

    聲明:

    該blog是為了收集資料,認識朋友,學習、提高技術,所以本blog的內容除非聲明,否則一律為轉載??!

    感謝那些公開自己技術成果的高人們?。?!

    支持開源,尊重他人的勞動??!

    常用鏈接

    留言簿(3)

    隨筆分類(148)

    隨筆檔案(143)

    收藏夾(2)

    其他

    學習(技術)

    觀察思考(非技術)

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    代碼:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"
    >
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>drag layer</title>
    <style>
    body,table
    {color:#000000;
        font-size
    :12px;
    }

    div.div_one
    {}
    .dragBar
    {color:#FFFFFF;
        font-weight
    :bold}

    </style>
    <script language="javascript" defer>
    /*written by joelee@51js
    */

        
    var tmpElement=null;
        
    var dragElement=null;
        
    var downX,downY,tmp_o_x,tmp_o_y;
        
    var refElement=null;
        
    var dragActive=0;
        
    var draging=0;
    function readyDrag(){
        dragActive
    =1;
        
    if(event.srcElement.tagName!="DIV")
            
    return;
        dragElement
    =event.srcElement.parentNode;
        tmpElement
    =dragElement.cloneNode(true);
        tmpElement.style.filter
    ="alpha(opacity=90)";
        tmpElement.style.zIndex
    =2;
        dragElement.style.zIndex
    =1;
        tmpElement.style.position
    ="absolute";
        
    if(dragElement.parentNode.tagName!="BODY"){
            dragElement.style.left
    =dragElement.offsetLeft+dragElement.parentNode.style.pixelLeft;
            dragElement.style.top
    =dragElement.offsetTop+dragElement.parentNode.style.pixelTop;
        }

        downX
    =event.clientX;
        downY
    =event.clientY;
        tmp_o_x
    =dragElement.style.pixelLeft;
        tmp_o_y
    =dragElement.style.pixelTop;
        tmpElement.style.visibility
    ="hidden";
        document.body.appendChild(tmpElement);
        document.onmousemove
    =startDrag;
        }

        document.onmouseup
    =endDrag;
    function startDrag(){
        
    if(dragActive==1&&event.button==1&&dragElement!=null&&tmpElement!=null){
            tmpElement.style.visibility
    ="visible";
            tmpElement.style.left
    =tmp_o_x+event.clientX-downX;
            tmpElement.style.top
    =tmp_o_y+event.clientY-downY;
            dragElement.style.backgroundColor
    ="#CCCCCC";
            document.body.style.cursor
    ="move";
            draging
    =1;
        }

    }

    function endDrag(){
        
    if(dragActive==1&&tmpElement!=null){
            
    if(draging==1){
                dragElement.removeNode(
    true);
                draging
    =0;
            }

            tmpElement.style.filter
    ="alpha(opacity=100)";
            tmpElement.style.zIndex
    =1;
            document.body.style.cursor
    ="default";
            
    if(refElement!=null&&refElement.parentNode!=null&&refElement.parentNode.tagName!="BODY"){
                tmpElement.style.width
    =refElement.parentNode.style.width;
                tmpElement.style.position
    ="";
                refElement.parentNode.insertBefore(tmpElement,refElement);
            }

        }

        dragElement
    =null;
        tmpElement
    =null;
        dragActive
    =0;
    }

    function readyInsert(){
        
    if(dragActive==1){
            
    var element=event.srcElement;
            
    if(element==dragElement)return;
            
    if(element.tagName!="DIV")
                
    return;
            
    if(element.className=="dragBar"||element.className=="textSheet"||element.className=="blankBar")
                element
    =element.parentNode;
            element.style.backgroundColor
    ="#CCCCCC";
            element.style.filter
    ="alpha(opacity=50)";
            refElement
    =element;
        }

    }

    function failInsert(){
        
    var element=event.srcElement;
        
    if(element.tagName!="DIV")
            
    return;
        
    try{
            
    if(element.className=="dragBar"||element.className=="textSheet"||element.className=="blankBar")
                element
    =element.parentNode;
        }
    catch(e){}
        element.style.filter
    ="alpha(opacity=100)";
        element.style.backgroundColor
    ="#FFFFFF";
        refElement
    =null;
    }

    document.onselectstart
    =function(){return false}
    </script>
    </head>

    <body>
    <div id="div_one" class="div_one" style="position:absolute; left:116px; top:137px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;" onMouseOver="readyInsert()" onMouseOut="failInsert()">
      
    <div onMouseDown="readyDrag()" style="cursor:move; border:1px solid #996666; background-color:#996666; height:20px" name="dragDIV" class="dragBar"><img src="snap_icon.gif" width="16" height="16">Window</div>
    <div class="textSheet" style="border:1px solid #996666;">Content<br>
      Content
    <br>
      Content
    <br>
      Content  
    <br>
    </div>
    <div class="blankBar" style="height:10px"></div></div>
    <div id="grid1" style="position:absolute; left:534px; top:37px; width:336px; height:15px; z-index: 100; visibility: visible;">
      
    <div style="height:20px;z-index:2;" onMouseOver="readyInsert()" onMouseOut="failInsert();">把層拖動到這兒</div>
    </div>
    <div id="grid2" style="position:absolute; left:20px; top:40px; width:494px; height:15px; z-index: 100; visibility: visible;">
      
    <div style="height:20px;z-index:2; background-image:url()" onMouseOver="readyInsert()" onMouseOut="failInsert();">把層拖動到這兒</div>
    </div>
    <div id="div_one" class="div_one" style="position:absolute; left:204px; top:277px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;" onMouseOver="readyInsert()" onMouseOut="failInsert()">
      
    <div onMouseDown="readyDrag()" style="cursor:move; border:1px solid #996666; background-color:#996666; height:20px" name="dragDIV" class="dragBar"><img src="snap_icon.gif" width="16" height="16">BBS</div>
      
    <div class="textSheet" style="border:1px solid #996666;">Content</div>
      
    <div class="blankBar" style="height:10px"></div>
    </div>
    <div id="div_one" class="div_one" style="position:absolute; left:561px; top:195px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;" onMouseOver="readyInsert()" onMouseOut="failInsert()">
      
    <div onMouseDown="readyDrag()" style="cursor:move; border:1px solid #996666; background-color:#996666; height:20px" name="dragDIV" class="dragBar"><img src="snap_icon.gif" width="16" height="16">Log</div>
      
    <div class="textSheet" style="border:1px solid #996666;">Content<br>
        Content
    <br>
        Content    
    <br>
      Content
    <br>
    </div>
      
    <div class="blankBar" style="height:10px"></div>
    </div>
    <div id="div_one" class="div_one" style="position:absolute; left:438px; top:74px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;" onMouseOver="readyInsert()" onMouseOut="failInsert()">
      
    <div onMouseDown="readyDrag()" style="cursor:move; border:1px solid #996666; background-color:#996666; height:20px" name="dragDIV" class="dragBar"><img src="snap_icon.gif" width="16" height="16">Worker</div>
      
    <div class="textSheet" style="border:1px solid #996666;">Content</div>
      
    <div class="blankBar" style="height:10px"></div>
    </div>
    <div id="div_one" class="div_one" style="position:absolute; left:206px; top:406px; width:433px; z-index:1; background-color: #FFFFFF; layer-background-color: #FFFFFF;" onMouseOver="readyInsert()" onMouseOut="failInsert()">
      
    <div onMouseDown="readyDrag()" style="cursor:move; border:1px solid #996666; background-color:#996666; height:20px" name="dragDIV" class="dragBar"><img src="snap_icon.gif" width="16" height="16">Tools</div>
      
    <div class="textSheet" style="border:1px solid #996666;">Content</div>
      
    <div class="blankBar" style="height:10px"></div>
    </div>
    </body>
    </html>
    posted on 2007-12-06 11:32 lk 閱讀(437) 評論(0)  編輯  收藏 所屬分類: ajax&js 、html
    主站蜘蛛池模板: 亚洲欧洲AV无码专区| 亚洲成人黄色在线| 特级毛片免费观看视频| 国产极品粉嫩泬免费观看| 亚洲精品自偷自拍无码| 日韩免费视频网站| 羞羞视频网站免费入口| 亚洲国产成人精品91久久久| 黄色免费网址大全| 亚洲精品夜夜夜妓女网| 久久精品免费一区二区三区| 亚洲综合国产精品| 免费看成人AA片无码视频羞羞网| 亚洲午夜精品在线| 免费观看a级毛片| 免费看内射乌克兰女| 亚洲综合精品香蕉久久网| 日韩成人免费视频| 亚洲综合综合在线| 嫩草影院免费观看| 九九综合VA免费看| 亚洲精品二区国产综合野狼| 99精品热线在线观看免费视频| 亚洲福利一区二区精品秒拍| 妞干网免费观看视频| 免费看内射乌克兰女| 亚洲欧洲日韩国产综合在线二区| 午夜国产精品免费观看| 国产亚洲精品美女2020久久| 色噜噜AV亚洲色一区二区| 日本一卡精品视频免费 | 性感美女视频免费网站午夜| 国产成人不卡亚洲精品91| 亚洲人成无码网站| 一个人在线观看视频免费| 色www免费视频| 久久精品国产亚洲AV无码麻豆| 午夜一级毛片免费视频| 成人性做爰aaa片免费看| 国产99在线|亚洲| 亚洲中文字幕无码久久精品1|