不知道怎么的 ,只要页面存在Ifrmae   分栏的拖动就变的很慢。】
第一次的拖动还行,第二次就获取不到鼠标的位置了、

解决方案 »

  1.   

    <script type="text/javascript">
            var _winWidth = 180;
            var _winHeight = 575;
            /*******************************/
            /***** Colmid (CM) Object *****/
            /*******************************/
            function CM() { }
            CM.mouseover = function(p_o) { p_o.style.backgroundColor = "#549FE3"; }
            CM.mouseout = function(p_o) { p_o.style.backgroundColor = "#FFFFFF"; }
            CM.mousedown = function(p_ev) {
                p_ev = (p_ev) ? p_ev : event;
                CM.ismousedown = true;
                CM.currpos = p_ev.clientX;
                CM.currLeftW = CM.getCurrLeftW();
                document.body.style.cursor = 'col-resize';
                return false;
            }
            CM.mouseup = function() {
                CM.ismousedown = false;
                document.body.style.cursor = 'auto';
                CM.currLeftW = parseInt(document.getElementById("colleft").style.width);
                return false;
            }
            CM.mousemove = function(p_ev) {
                if (CM.ismousedown) {
                    p_ev = (p_ev) ? p_ev : event;
                    var newpos = p_ev.clientX;
                    var pxmoved = parseInt(newpos - CM.currpos);
                    pxmoved = (document.body.dir == 'rtl') ? -pxmoved : pxmoved;
                    var newLeftW = parseInt(CM.currLeftW + pxmoved);
                    var newRightW = getWinWidth() - newLeftW - CM.rightWAdj;
                    if (newLeftW >= CM.minLeft && newRightW >= CM.minRight) {
                        document.getElementById("colleft").style.width = newLeftW + 'px';
                    }
                    return false
                } else return true;
            }
            CM.setMinLeft = function() {
                CM.minLeft = 1;
            }
            CM.getCurrRightW = function() {
                return getWinWidth() - CM.getCurrLeftW() - CM.rightWAdj;
            }
            CM.getCurrLeftW = function() {
                if (CM.currLeftW == 0) CM.currLeftW = parseInt(document.getElementById("colleft").style.width);
                return CM.currLeftW;
            }
            CM.ismousedown;
            CM.currpos;
            CM.currLeftW = 0;
            CM.minLeft;
            CM.minRight = 920;
            CM.rightWAdj = 21; //8+8+5 
            /***** End Colmid (CM) Object *****/        function getElemHeight(p_el) {
                if (p_el.innerHeight) return p_el.innerHeight;
                else if (p_el.clientHeight) return p_el.clientHeight;
                else return p_el.offsetHeight;
            }
            function getWinHeight() {
                if (window.innerHeight) return window.innerHeight;
                else if (document.documentElement.clientHeight) return document.documentElement.clientHeight;
                else if (document.body.offsetHeight) return document.body.offsetHeight;
                else return _winHeight;
            }
            function getWinWidth() {
                if (window.innerWidth) return window.innerWidth;
                else if (document.documentElement.clientWidth) return document.documentElement.clientWidth;
                else if (document.body.offsetWidth) return document.body.offsetWidth;
                else return _winWidth;
            }
            function HandleOnLoad() {
                CM.setMinLeft();
            }
            /***** Attach events *****/
            window.onload = HandleOnLoad;        /*
            function hiddenOrDisplayLeft() {
            if (document.getElementById('Left').style.display == "none") {
            document.getElementById('Left').style.display = 'block';
            document.getElementById('hiddenImg').src = "../../img/btn_right_img.gif";
            } else {
            document.getElementById('Left').style.display = 'none';
            document.getElementById('hiddenImg').src = "../../img/btn_left_img.gif";
            }
            }
            */
            $(function() {
                $("#Header_list_LegClassLabel").addClass("BGColor");
            })
        </script>
      

  2.   

    <body style="margin: 0px;" dir="ltr" onmouseup="return CM.mouseup();" onmousemove="return CM.mousemove(event);">
        <form id="form1" runat="server">
        <uc1:Header ID="Header" runat="server" />
        <div align="center">
            <center>
                <table border="0" cellspacing="0" cellpadding="0" style="width: 1280px; height: 100%">
                    <tr>
                        <td align="left" id="colleft" style="width: 195px;">
                            <iframe frameborder="0" id="I1" name="I1" src="LeftTree.aspx" class="main_iframe"
                                allowtransparency="true"></iframe>
                        </td>
                        <td style="width: 1px; cursor: col-resize;" id="colmid" onmouseover="CM.mouseover(this)"
                            onmouseout="CM.mouseout(this)" onmousedown="return CM.mousedown(event)" onmouseup="return CM.mouseup();">
                        </td>
                        <td id="colright" style="height: 650px">
                            <iframe frameborder="0" id="I2" name="I2" scrolling="yes" src="DataShow.aspx" class="main_iframe">
                            </iframe>
                        </td>
                    </tr>
                </table>
            </center>
        </div>
        </form>
    </body>
      

  3.   

     <style type="text/css">
            .left_iframe
            {
                width: 180px;
                height: 92%;
                background: transparent;
            }
            .main_iframe
            {
                z-index: 1;
                width: 100%;
                height: 650px;
            }
        </style>