javascript

gfdsgfdsg

<html>
<head>
 <title>个性化主页</title>
 <link type="text/css" rel="stylesheet" href="css/default.css" />

 <script type="text/javascript" src="js/prototype.js"></script>

 <script type="text/javascript" src="js/scriptaculous.js?load=effects,dragdrop"></script>

</head>
<body>
 <div id="main">
  <div id="leftContainer">
   <div class="module" style="height: 200px">
   </div>
  </div>
  <div id="midContainer">
   <div class="module" style="height: 200px">
   </div>
   <div class="module" style="height: 200px">
   </div>
  </div>
  <div id="rightContainer">
   <div class="module" style="height: 200px">
   </div>
   <div class="module" style="height: 200px">
   </div>
   <div class="module" style="height: 200px">
   </div>
  </div>
 </div>

 <script type="text/javascript">
  function enableDnd() {
   var containers = ["leftContainer", "midContainer", "rightContainer"];
   
   var kw = {
    tag: "div",
    treeTag: "div",
    handle: "title",
    dropOnEmpty: true,
    containment: containers,
    constraint: false,
    ghosting:true,
    onUpdate:function(){
       //$('thirdlist_debug').style
       var object=event.srcElement;
       object.style.zInde=1;
       object.style.border="1px dashed red";
      
    }
   }; 

   containers.each( function(module) {
    Sortable.destroy(module);
    Sortable.create(module, kw);
   });
  }
  
  enableDnd();
  
  function getInfo(o){//取得坐标
           var to=new Object();
           to.left=to.right=to.top=to.bottom=0;
           var twidth=o.offsetWidth;
           var theight=o.offsetHeight;
           while(o!=document.body){
           to.left+=o.offsetLeft;
           to.top+=o.offsetTop;
           o=o.offsetParent;
           }
           to.right=to.left+twidth;
           to.bottom=to.top+theight;
           return to;
         }
        
 function  dragEnd(){
 tdiv.mm=Drag.repos(150,15);
 object.style.borderWidth="0px";
 object.style.borderTop="1px solid #3366cc";
 tdiv.style.borderWidth="0px";
 objcet.style.zIndex=1;
}

 </script>

</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值