zoukankan      html  css  js  c++  java
  • 不知道干什么的Js代码

    function carltbl_getBandById(tagId) 
    {
        
    if(!tagId)
            
    return null;
        
    var parts = tagId.split("_");
        
    var bandIndex = parts.length - 2;
        
    var gridId = parts[0];
        
    var el=carltbl_getElementById(tagId);
        
    if((gridId.charAt(gridId.length-3)=="g" && 
                gridId.charAt(gridId.length
    -2)=="r" && 
                gridId.charAt(gridId.length
    -1)=="c" || gridId.charAt(gridId.length-3)=="s" && 
                gridId.charAt(gridId.length
    -2)=="g" && 
                gridId.charAt(gridId.length
    -1)=="r"&& 
                el 
    && el.getAttribute("groupRow"))
        
    {
            gridId
    =gridId.substr(0,gridId.length-3);
            bandIndex
    --;
        }

        
    else if(el && (gridId.charAt(gridId.length-2)=="r" && 
                        gridId.charAt(gridId.length
    -1)=="c" && 
                        el.tagName
    =="TD" || gridId.charAt(gridId.length-2)=="g" && 
                        gridId.charAt(gridId.length
    -1)=="r" && 
                        el.getAttribute(
    "groupRow"|| gridId.charAt(gridId.length-2)=="r" && 
                        gridId.charAt(gridId.length
    -1)=="h" && 
                        el.getAttribute(
    "hiddenRow")))
        
    {
            gridId
    =gridId.substr(0,gridId.length-2);
            bandIndex
    --;
        }

        
    else if(gridId.charAt(gridId.length-1)=="r" && el && el.tagName=="TR")
            gridId
    =gridId.substr(0,gridId.length-1);
        
    else if(gridId.charAt(gridId.length-1)=="c" && el && el.tagName=="TH")
        
    {
            gridId
    =gridId.substr(0,gridId.length-1);
            bandIndex
    =parts[1];
        }

        
    else
            
    return null;
        
    if(!carltbl_getGridById(gridId))
            
    return null;
        
    var grid = carltbl_getGridById(gridId);
        
    return grid.Bands[bandIndex];
    }
  • 相关阅读:
    uva 1606 amphiphilic carbon molecules【把缩写写出来,有惊喜】(滑动窗口)——yhx
    Uva10082 WERTYU -S.B.S.
    Quicksum-S.B.S.
    NOIP2014提高组 DAY1 -SilverN
    NOIP2013普及组 -SilverN
    uva 1354 Mobile Computing ——yhx
    UVa 11292 Dragon of Loowater
    UVa 839 Not so Mobile
    Quicksum -SilverN
    uva 140 bandwidth (好题) ——yhx
  • 原文地址:https://www.cnblogs.com/Flynn/p/864688.html
Copyright © 2011-2022 走看看