注冊|登錄

聯系電話:024-31891684  13390130939
沈陽軟件公司--沈陽軟件定制

沈陽軟件開發_沈陽軟件公司_沈陽軟件定制/軟件/最新技術

Latest technology最新技術

CSS+DIV+JS實現拖動層效果

瀏覽量:4475

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=gb2312">
  <meta http-equiv="content-script-type" content="text/javascript">
  <meta http-equiv="content-style-type" content="text/css">
  <title>可拖動的div</title>
  <style rel="stylesheet" type="text/css" media="all" />
  <!--

  #diamondCompareList {
    width:400px;
    position:absolute;
    left:600px;
    top:100px;
    background:#EFEFFF;
    text-align:left;
  
  }
  #ChatHead {
    text-align:right;
    padding:3px;
    border:1px solid #003399;
    background:#DCDCFF;
    font-size:11px;
    color:#3366FF;
    cursor:move;
  }
  -->
  </style>
  <script language="javascript" type="text/javascript">
  <!--
  function hd(d){return document.getElementById(d);}
  function gs(d){var t=hd(d);if (t){return t.style;}else{return null;}}
  function gs2(d,a){
    if (d.currentStyle){
      var curVal=d.currentStyle[a]
    }else{
      var curVal=document.defaultView.getComputedStyle(d, null)[a]
    }
    return curVal;
  }
  function DiamondHidden(){gs("diamondCompareList").display = "none";}
  function DiamondShow(){gs("diamondCompareList").display = "";}
  function DiamondClose(){gs("main").display = "none";}
  function ChatSend(obj){
    var o = obj.ChatValue;
    if (o.value.length>0){
      hd("ChatContent").innerHTML += "<strong>Akon說:</strong>"+o.value+"<br/>";
      o.value='';
    }
  }
  if  (document.getElementById){
    (
      function(){
        if (window.opera){ document.write("<input type='hidden' id='Q' value=' '>"); }
     
        var n = 500;
        var dragok = false;
        var y,x,d,dy,dx;
       
        function move(e)
        {
          if (!e) e = window.event;
          if (dragok){
            d.style.left = dx + e.clientX - x + "px";
            d.style.top  = dy + e.clientY - y + "px";
            return false;
          }
        }
       
        function down(e){
          if (!e) e = window.event;
          var temp = (typeof e.target != "undefined")?e.target:e.srcElement;
          if (temp.tagName != "HTML"|"BODY"  &&  temp.className != "dragclass"){
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
          }
          if('TR'==temp.tagName){
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
            temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
          }
       
          if (temp.className == "dragclass"){
            if (window.opera){ document.getElementById("Q").focus(); }
            dragok = true;
            temp.style.zIndex = n++;
            d = temp;
            dx = parseInt(gs2(temp,"left"))|0;
            dy = parseInt(gs2(temp,"top"))|0;
            x = e.clientX;
            y = e.clientY;
            document.onmousemove = move;
            return false;
          }
        }
       
        function up(){
          dragok = false;
          document.onmousemove = null;
        }
       
        document.onmousedown = down;
        document.onmouseup = up;
     
      }
    )();
  }
  -->
  </script>
</head>
<body>
<div style="left: 0px; top: 512px; cursor: move;"  id="diamondCompareList" class="dragclass" style="left:600px;top:300px;" class="span-5 diamond_compare_list">
    <div class="title border_1"   id="ChatHead">
        <span>鉆石對比</span>
        <input class="close" value="關閉" type="button">
    </div>
    <div class="text d_compare_list" id="ChatContent">
        <ol id='oldb'></ol>
        <input id="clearCompare" class="compare" value="清空對比" type="button">
        <input id="gotoCompare" class="compare" value="查看對比" type="button">
    </div>
</div>

</body>
</html>

沈陽團購網|營口網站制作|沈陽軟件公司|軟件定制|網站建設|加盟易勢|提交問題

主站蜘蛛池模板: 人人添人人澡人人澡人人人人| 国产欧美va欧美va香蕉在线观看 | 在线观看视频日韩| 中文字幕无码中文字幕有码| 日韩黄色免费观看| 亚洲日本中文字幕天堂网| 看AV免费毛片手机播放| 国产chinasex对白videos麻豆| 黑色丝袜美腿美女被躁翻了| 国产精品小青蛙在线观看| av成人在线电影| 少妇被又大又粗又爽毛片久久黑人 | 亚洲国产精品成人精品软件| 男女一进一出呻吟的动态图| 噼里啪啦完整高清观看视频| 韩国亚洲伊人久久综合影院| 国产精品久久久久久网站| 亚洲欧美日韩中文字幕一区二区三区 | 久久夜色精品国产噜噜麻豆| 欧美伦理三级在线播放影院| 亚洲精品第二页| 秋霞免费乱理伦片在线观看| 可以看污视频的网站| 西西人体444rt高清大胆| 国产成人精品动图| poren日本| 国产色无码精品视频免费| aaa免费毛片| 女人张腿让男桶免费视频大全 | 日韩在线一区视频| 亚洲AV综合色区无码二区偷拍| 欧美成人午夜精品免费福利| 亚洲精品乱码久久久久久蜜桃| 电车痴汉在线观看| 免费看大黄高清网站视频在线| 美女爽到尿喷出来| 四虎成人免费网站在线| 色哟哟网站在线观看| 国产亚洲情侣一区二区无| 韩国电影中文字幕| 国产国语对白露脸在线观看|