锘??xml version="1.0" encoding="utf-8" standalone="yes"?>九九热久久66,人在线成免费视频,亚洲色图图片http://www.aygfsteel.com/jhlcss/category/24767.htmlif you study hard every day.zh-cnThu, 09 Aug 2007 20:36:52 GMTThu, 09 Aug 2007 20:36:52 GMT60FCKEditor涓〃鏍煎垪浠ュ強澶氳鍒楁棤娉曞悎騫剁殑瑙e喅鍔炴硶http://www.aygfsteel.com/jhlcss/archive/2007/08/09/135601.html濮滄搗榫?/dc:creator>濮滄搗榫?/author>Thu, 09 Aug 2007 10:47:00 GMThttp://www.aygfsteel.com/jhlcss/archive/2007/08/09/135601.htmlhttp://www.aygfsteel.com/jhlcss/comments/135601.htmlhttp://www.aygfsteel.com/jhlcss/archive/2007/08/09/135601.html#Feedback0http://www.aygfsteel.com/jhlcss/comments/commentRss/135601.htmlhttp://www.aygfsteel.com/jhlcss/services/trackbacks/135601.html
 1FCKTableHandler.MergeCells = function()
 2{
 3    // Get all selected cells.
 4    var aCells = FCKTableHandler.GetSelectedCells() ;
 5
 6    // At least 2 cells must be selected.
 7    if ( aCells.length < 2 )
 8        return ;
 9
10    // The merge can occour only if the selected cells are from the same row.
11    if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode )
12        return ;
13
14    // Calculate the new colSpan for the first cell.
15    var iColSpan = isNaN( aCells[0].colSpan ) ? 1 : aCells[0].colSpan ;
16
17    var sHtml = '' ;
18    var oCellsContents = FCK.EditorDocument.createDocumentFragment() ;
19
20    for ( var i = aCells.length - 1 ; i >= 0 ; i-- )
21    {
22        var eCell = aCells[i] ;
23
24        // Move its contents to the document fragment.
25        for ( var c = eCell.childNodes.length - 1 ; c >= 0 ; c-- )
26        {
27            var eChild = eCell.removeChild( eCell.childNodes[c] ) ;
28
29            if ( ( eChild.hasAttribute && eChild.hasAttribute('_moz_editor_bogus_node') ) || ( eChild.getAttribute && eChild.getAttribute( 'type', 2 ) == '_moz' ) )
30                continue ;
31
32                oCellsContents.insertBefore( eChild, oCellsContents.firstChild ) ;
33        }

34
35        if ( i > 0 )
36        {
37            // Accumulate the colspan of the cell.
38            iColSpan += isNaN( eCell.colSpan ) ? 1 : eCell.colSpan ;
39
40            // Delete the cell.
41            FCKTableHandler.DeleteCell( eCell ) ;
42        }

43    }

44
45    // Set the innerHTML of the remaining cell (the first one).
46    aCells[0].colSpan = iColSpan ;
47
48    if ( FCKBrowserInfo.IsGecko && oCellsContents.childNodes.length == 0 )
49        aCells[0].innerHTML = GECKO_BOGUS ;
50    else
51        aCells[0].appendChild( oCellsContents ) ;
52}
絎?0琛屼唬鐮佸鍒楀悎騫跺仛浜嗛檺鍒訛紝涓嬮潰鏄慨鏀圭殑浠g爜錛?br>
 1FCKTableHandler.MergeCells = function()
 2{
 3    // Get all selected cells.
 4    var aCells = FCKTableHandler.GetSelectedCells() ;
 5
 6    // At least 2 cells must be selected.
 7    if ( aCells.length < 2 )
 8        return ;
 9
10    // The merge can occour only if the selected cells are from the same row.
11    //if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode ){
12    //    alert("xx");
13    //    return ;
14    //}
15    
16    //*********************************************************************
17    //鍦↖E涓嬪悎騫跺崟鍏冩牸淇敼錛屼富瑕侀拡瀵逛笂涓嬪崟鍏冩牸涓嶈兘鍚堝茍鐨勯棶棰樸?/span>
18    //濮滄搗榫?/span>
19    var iLen = aCells.length;
20    var iStartCol = aCells[0].cellIndex ;
21    var iStartRow = aCells[0].parentElement.rowIndex ;
22    
23    var iEndCol = aCells[iLen-1].cellIndex ;
24    var iEndRow = aCells[iLen-1].parentElement.rowIndex ;
25    
26    var eCells = new Array();
27    var j = 0;
28    
29    for(var i = 0; i < iLen; i++){
30        if(aCells[i].cellIndex >= iStartCol && aCells[i].cellIndex <= iEndCol){
31            eCells[j] = aCells[i];
32            j++;
33        }

34    }

35
36    aCells[0].colSpan = iEndCol - iStartCol + 1;
37    aCells[0].rowSpan = iEndRow - iStartRow + 1;
38
39    for (var i = 1; i < j; i++){
40            eCells[i].parentElement.removeChild(eCells[i]);
41    }

42    
43    //alert(aCells[0].rowSpan);
44    //alert(aCells[0].parentElement.parentElement.innerHTML);
45    //*********************************************************************
46
47
48}
璇ヤ唬鐮佹湭緇忓叏闈㈡祴璇?

]]>
主站蜘蛛池模板: 东乌| 石渠县| 紫金县| 宜章县| 河南省| 突泉县| 五大连池市| 梁山县| 林州市| 忻城县| 博罗县| 惠州市| 黄龙县| 建水县| 西林县| 广元市| 丹江口市| 尉氏县| 新巴尔虎左旗| 临安市| 迭部县| 阳信县| 阳高县| 沙河市| 远安县| 宽甸| 丽水市| 时尚| 玉环县| 海丰县| 莎车县| 石林| 额尔古纳市| 榆中县| 怀安县| 广西| 巨鹿县| 观塘区| 苗栗市| 甘泉县| 祥云县|