锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲综合一区国产精品,亚洲国产精品特色大片观看完整版,亚洲视频一区在线http://www.tkk7.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.tkk7.com/jhlcss/archive/2007/08/09/135601.html濮滄搗榫?/dc:creator>濮滄搗榫?/author>Thu, 09 Aug 2007 10:47:00 GMThttp://www.tkk7.com/jhlcss/archive/2007/08/09/135601.htmlhttp://www.tkk7.com/jhlcss/comments/135601.htmlhttp://www.tkk7.com/jhlcss/archive/2007/08/09/135601.html#Feedback0http://www.tkk7.com/jhlcss/comments/commentRss/135601.htmlhttp://www.tkk7.com/jhlcss/services/trackbacks/135601.html
1FCKTableHandler.MergeCells =function() 2{ 3// Get all selected cells. 4var aCells = FCKTableHandler.GetSelectedCells() ; 5 6// At least 2 cells must be selected. 7if ( aCells.length <2 ) 8return ; 9 10// The merge can occour only if the selected cells are from the same row. 11if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode ) 12return ; 13 14// Calculate the new colSpan for the first cell. 15var iColSpan = isNaN( aCells[0].colSpan ) ?1 : aCells[0].colSpan ; 16 17var sHtml = '' ; 18var oCellsContents = FCK.EditorDocument.createDocumentFragment() ; 19 20for ( var i = aCells.length -1 ; i >=0 ; i-- ) 21{ 22var eCell = aCells[i] ; 23 24// Move its contents to the document fragment. 25for ( var c = eCell.childNodes.length -1 ; c >=0 ; c-- ) 26{ 27var eChild = eCell.removeChild( eCell.childNodes[c] ) ; 28 29if ( ( eChild.hasAttribute && eChild.hasAttribute('_moz_editor_bogus_node') ) || ( eChild.getAttribute && eChild.getAttribute( 'type', 2 ) == '_moz' ) ) 30continue ; 31 32 oCellsContents.insertBefore( eChild, oCellsContents.firstChild ) ; 33 } 34 35if ( 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 48if ( FCKBrowserInfo.IsGecko && oCellsContents.childNodes.length ==0 ) 49 aCells[0].innerHTML = GECKO_BOGUS ; 50else 51 aCells[0].appendChild( oCellsContents ) ; 52}
絎?0琛屼唬鐮佸鍒楀悎騫跺仛浜嗛檺鍒訛紝涓嬮潰鏄慨鏀圭殑浠g爜錛?br>
1FCKTableHandler.MergeCells =function() 2{ 3// Get all selected cells. 4var aCells = FCKTableHandler.GetSelectedCells() ; 5 6// At least 2 cells must be selected. 7if ( aCells.length <2 ) 8return ; 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> 19var iLen = aCells.length; 20var iStartCol = aCells[0].cellIndex ; 21var iStartRow = aCells[0].parentElement.rowIndex ; 22 23var iEndCol = aCells[iLen-1].cellIndex ; 24var iEndRow = aCells[iLen-1].parentElement.rowIndex ; 25 26var eCells =new Array(); 27var j =0; 28 29for(var i =0; i < iLen; i++){ 30if(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 39for (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}