放置行
放置列

js 文件里的代码:

function myLoad()
    if (document.getElementById("dMain"))
        divInit();
function myResize()
    if (document.getElementById("dMain"))
        divInit();
function divInit()
    var dMain = document.getElementById("dMain");        //主Div
    var dTop = document.getElementById("dTop");            //锁定行的Div
    var dLeft = document.getElementById("dLeft");        //锁定列的Div
    var dMid = document.getElementById("dMid");            //左上角的Div
    var windowWidth = document.body.scrollWidth;
    var windowHeight = document.body.clientHeight;
    //alert(windowWidth);
    dMain.style.background="#ffffff";
    //alert(windowHeight);
    dMain.style.width = windowWidth - ;
    var sch = document.getElementById("div_Search");
    //alert(sch.scrollHeight);
    if (sch.style.display == "")
        dMain.style.height = windowHeight -  - sch.scrollHeight;
        dMain.style.height = windowHeight - ;
    //dMain.style.display = "none";
    //寻找Top 和 Left
    var tt = dMain;            //    寻找左上角的坐标,代码来自梅花雪的日期控件
    var th = tt;
    var ttop  = tt.offsetTop;
    var thei  = tt.clientHeight;  
    var tleft = tt.offsetLeft;  
    var ttyp  = tt.type;        
    while (tt = tt.offsetParent){ttop+=tt.offsetTop; tleft+=tt.offsetLeft;}
    var myTop  = (ttyp=="image")? ttop+thei : ttop+thei+;    //左上角的坐标
    var myLeft = tleft;                                        //左上角的坐标
    //===================================寻找完毕===============
    //锁定行的高度
    var RowsHeight = dg.rows[RowsCount].cells[].offsetTop - dg.rows[].cells[].offsetTop + 
    //锁定列的宽度
    var LineWidth =  dg.rows[].cells[LineCount].offsetLeft - dg.rows[].cells[].offsetLeft + 
    //锁定列的高度
    var LineHeight = dMain.style.height;
    LineHeight = LineHeight.replace("px","");
    //锁定行的宽度
    var RowsWidth = dMain.style.width;
    RowsWidth = RowsWidth.replace("px","");
    //hh = parseint(hh);
    divResize(dMain,dTop,dLeft,dMid);
    if (RowsHeight <)
        RowsHeight = ;
    if (LineWidth <)
        LineWidth = ;
    dTop.style.width = RowsWidth - ;
    dTop.style.height = RowsHeight;
    dLeft.style.width = LineWidth;
    dLeft.style.height = LineHeight - ;
    dMid.style.width = LineWidth ;
    dMid.style.height = RowsHeight;
    //设置左上角的位置
    dTop.style.top = myTop ;
    dTop.style.left = myLeft ;
    dLeft.style.top = myTop;
    dLeft.style.left = myLeft;
    dMid.style.top = myTop;
    dMid.style.left = myLeft;
function divResize(dMain,dTop,dLeft,dMid)
    dTop.innerHTML = dMain.innerHTML;
    dMid.innerHTML = dMain.innerHTML;
    dLeft.innerHTML =  dMain.innerHTML;
    dLeft = dMain;
function divResize2(dMain,dLeft)
    dLeft.innerHTML = dMain.innerHTML;
function myScroll(me)
    var dTop = document.getElementById("dTop");
    var dLeft = document.getElementById("dLeft");
    var dMid = document.getElementById("dMid");            //左上角的Div
 
推荐文章
个性的单杠  ·  java string转对象数组_mob64ca12d32849的技术博客_51CTO博客
1 周前
孤独的铁链  ·  Intellij IDEA设置默认文档注释 - 知乎
1 年前
想发财的镜子  ·  关于anaconda2与anaconda3两个版本的共存问题 - 知乎
2 年前
热心肠的匕首  ·  sql语句如何让查询结果作为另一个sql的列名?_百度知道
2 年前
玩足球的核桃  ·  SQLite时间函数&日期时间、字符串、时间戳互相转换_sqlite 时间戳_markix的博客-CSDN博客
2 年前