页面调用:onmouseup='stopDrag(this)'JS代码:
//停止拖动;
        function stopDrag(obj) {
            if (moveable) {
                var win = obj.parentNode;
                var sha = win.nextSibling;
                var msg = obj.nextSibling;
                win.style.borderColor = normal;
                obj.style.backgroundColor = normal;
                msg.style.color = normal;
                sha.style.left = obj.parentNode.style.left;
                sha.style.top = obj.parentNode.style.top;
                obj.releaseCapture();
                moveable = false;                // setCookie(obj, sha.style.left + "*" + sha.style.top);
                alert(this.id + "*" + sha.style.left + "*" + sha.style.top);
            }
        }
如何根据这个obj对象取其ID值,页面上的ID是动态值,请教了