oTr.rowIndex % 2 != 0 ? oTr.style.backgroundColor = b ? aBgColor[3] : aBgColor[1] : oTr.style.backgroundColor = b ? aBgColor[2] : aBgColor[0];aBgColor是存放着几个颜色的数组
oTr是TR对象
b是布尔值,
oTr是TR对象
b是布尔值,
解决方案 »
- 怎样修改ExtJS控件的UI
- parent.addLinkPath 什么属性? 在w3c 文档中 什么位置?
- js弹出MSN效果
- 再次在线跪求,offsetLeft和offsetTop兼容ie6、7问题
- 超高性能的树形菜单,建议csdn用我写的这个树形菜单
- 超简单问题,在JAVASCRIPT中如何实现对WINDOWS的移动?
- 高手求教!微软中国主页左侧的导航栏是怎么做出来的?
- 求一语句的写法!!!高手帮忙!!
- 有一表单,有八个输入框,名字为(a-h),一个隐藏框名字为(i),提交至下一页,如何让隐藏框
- 使用EventEmitter,或者是页面上的自定义事件,有什么意义?
- JS 中调用 PHP 的函数
- 真奇怪,为什么clearInterval方法不起作用了?
{
...
}
else
{
...
}
oTr.rowIndex % 2 != 0 ? oTr.style.backgroundColor = b ? aBgColor[3] : aBgColor[1] : oTr.style.backgroundColor = b ? aBgColor[2] : aBgColor[0];
if (oTr.rowIndex % 2 != 0) {
if (b) {
oTr.style.backgroundColor = aBgColor[3];
} else {
oTr.style.backgroundColor = aBgColor[1];
}
} else {
if (b) {
oTr.style.backgroundColor = aBgColor[2];
} else {
oTr.style.backgroundColor = aBgColor[0];
}
}
if (oTr.rowIndex % 2 != 0) {
if (b) {
oTr.style.backgroundColor = aBgColor[3];
} else {
oTr.style.backgroundColor = aBgColor[1];
}
} else {
if (b) {
oTr.style.backgroundColor = aBgColor[2];
} else {
oTr.style.backgroundColor = aBgColor[0];
}
}