if (! bExists)
{
var iRows = document.getElementById('txtRows').value ;
var iCols = document.getElementById('txtColumns').value ;
for ( var r = 0 ; r < iRows ; r++ )
{
var oRow = table.insertRow(-1) ;
for ( var c = 0 ; c < iCols ; c++ )
{
var oCell = oRow.insertCell(-1) ;
if ( oEditor.FCKBrowserInfo.IsGeckoLike )
oEditor.FCKTools.AppendBogusBr( oCell ) ;
}
}
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertElement( table ) ;
}帝国CMS里截取的一段代码,是插入TABLE表格的行与列~~~
我想让他插入行的时候赋予背景色,bgcolor=#ffffff 插入列的时候赋予宽度 WIDTH=20%
如何操作?谢了!
{
var iRows = document.getElementById('txtRows').value ;
var iCols = document.getElementById('txtColumns').value ;
for ( var r = 0 ; r < iRows ; r++ )
{
var oRow = table.insertRow(-1) ;
for ( var c = 0 ; c < iCols ; c++ )
{
var oCell = oRow.insertCell(-1) ;
if ( oEditor.FCKBrowserInfo.IsGeckoLike )
oEditor.FCKTools.AppendBogusBr( oCell ) ;
}
}
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertElement( table ) ;
}帝国CMS里截取的一段代码,是插入TABLE表格的行与列~~~
我想让他插入行的时候赋予背景色,bgcolor=#ffffff 插入列的时候赋予宽度 WIDTH=20%
如何操作?谢了!
解决方案 »
- 求高手js
- 如何取得Ext.data.Store中的json数据啊?从是struts2传过来的json不知道到底出过来没有。帮帮忙给位大侠
- 用element.value的形式访问属性的值
- 大侠帮忙,这些功能怎么实现
- 关于JavaScript数组的问题
- 请教~csdn社区中心右下角的div是如何实现的就是聊天窗口所在的那一行
- 关于域名式的网页推送,遇到了一个棘手的问题~~
- 关于几个getElement的区分
- 用javascript如何判断密码和密码确认所填内容是否一致?
- go(-1) yu与go(-2)的一个奇怪的现象!
- 求好的javascript menu的库和例子,谢谢。
- 正则 修改HTML标签 在线等...
for ( var c = 0 ; c < iCols ; c++ )
中间写
var oRow = table.insertRow(-1) ;
oRow.style.background="#ffffff";
oRow.style.width="20%";
for ( var c = 0 ; c < iCols ; c++ )
{
var iRows = document.getElementById('txtRows').value ;
var iCols = document.getElementById('txtColumns').value ; for ( var r = 0 ; r < iRows ; r++ )
{ var oRow = table.insertRow(-1) ;
oRow.style.background="#ffffff";
for ( var c = 0 ; c < iCols ; c++ )
{
var oCell = oRow.insertCell(-1) ;
oCell.style.width="20%";
if ( oEditor.FCKBrowserInfo.IsGeckoLike )
oEditor.FCKTools.AppendBogusBr( oCell ) ;
}
} oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCK.InsertElement( table ) ;
}