JS仿iGoogle自定义首页模块拖拽特效的方法(10)

//务必写在此IF内
                            dragDiv.style.left = "";
                            dragDiv.style.top = "";

dragDiv.style.width = "";
                            dragDiv.style.position = ""; 
                            dashedElement.parentNode.insertBefore(dragDiv, dashedElement);
                            dashedElement.parentNode.removeChild(dashedElement);
                        }

};

}
            },
            SetOpacity: function(dragDiv, n) {
                if (Common.isIE) {
                    dragDiv.filters.alpha.opacity = n;
                }
                else {
                    dragDiv.style.opacity = n / 100;
                }

},
            GetZindex: function() {
                var maxZindex = 0;
                var divs = document.getElementsByTagName("div");
                for (z = 0; z < divs.length; z++) {
                    maxZindex = Math.max(maxZindex, divs[z].style.zIndex);
                }
                return maxZindex;
            },
            RegDragsPos: function() {
                var arrDragDivs = new Array();
                var dragTbl = document.getElementById("dragTable");
                var tmpDiv, tmpPos;
                for (i = 0; i < dragTbl.getElementsByTagName("div").length; i++) {
                    tmpDiv = dragTbl.getElementsByTagName("div")[i];
                    if (tmpDiv.className == "dragDiv") {
                        tmpPos = Common.getElementPos(tmpDiv);
                        arrDragDivs.push({ DragId: tmpDiv.id, PosLeft: tmpPos.x, PosTop: tmpPos.y, PosWidth: tmpDiv.offsetWidth, PosHeight: tmpDiv.offsetHeight });
                    }
                }
                return arrDragDivs;
            }
        }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wgffxd.html