自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行 - 张孝祥专栏 - CSDNBlog
2007-11-20 12:21
671 查看
双色表格CSS实例
.test {
background-color:red;
}
#DataGrid1 tr {
background-color: expression(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
(this.sectionRowIndex % 2 == 0) ? "#FFF0F0" : "#F0F0FF"
)
);
color: expression(this.sectionRowIndex == 0 ? "#FFFFFF" : "");
font-weight: expression(this.sectionRowIndex == 0 ? "BOLD" : "");
RowSelect: expression(0==1?"":(
onclick = function()
{
window.currentRow?window.currentRow.style.backgroundColor=(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
):"";
this.style.backgroundColor="#f3c3f3";
window.currentRow=this;
window.stopOut=true;
}
)
);
TableSelect: expression(
this.sectionRowIndex == 0 ? "" :
(
onmouseover = function()
{
window.stopOut=false;
this.style.backgroundColor =
(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
)
},
onmouseout = function()
{
if(window.stopOut) return;
this.style.backgroundColor =
(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
)
}
)
);
}
#DataGrid1 td {
background-color:expression(
this.cellIndex == 0 ?
(
this.parentElement.sectionRowIndex == 0 ? "#FFCCCC" : "#DDDDDD"
)
: null
)
}
.FindAreaTable1 {
font-size: 12px;
color: #333333;
text-decoration: none;
width: 400px;
cursor: hand;
background-color: #FFFFFF;
vertical-align: middle;
text-align: center;
}
本文转自
http://blog.csdn.net/zhangxiaoxiang/archive/2007/10/10/1819230.aspx
.test {
background-color:red;
}
#DataGrid1 tr {
background-color: expression(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
(this.sectionRowIndex % 2 == 0) ? "#FFF0F0" : "#F0F0FF"
)
);
color: expression(this.sectionRowIndex == 0 ? "#FFFFFF" : "");
font-weight: expression(this.sectionRowIndex == 0 ? "BOLD" : "");
RowSelect: expression(0==1?"":(
onclick = function()
{
window.currentRow?window.currentRow.style.backgroundColor=(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
):"";
this.style.backgroundColor="#f3c3f3";
window.currentRow=this;
window.stopOut=true;
}
)
);
TableSelect: expression(
this.sectionRowIndex == 0 ? "" :
(
onmouseover = function()
{
window.stopOut=false;
this.style.backgroundColor =
(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
)
},
onmouseout = function()
{
if(window.stopOut) return;
this.style.backgroundColor =
(
this.style.backgroundColor != "#69cdff" ? "#69cdff" :
(
this.sectionRowIndex == 0 ? "#FFCCCC" :
(
this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
)
)
)
}
)
);
}
#DataGrid1 td {
background-color:expression(
this.cellIndex == 0 ?
(
this.parentElement.sectionRowIndex == 0 ? "#FFCCCC" : "#DDDDDD"
)
: null
)
}
.FindAreaTable1 {
font-size: 12px;
color: #333333;
text-decoration: none;
width: 400px;
cursor: hand;
background-color: #FFFFFF;
vertical-align: middle;
text-align: center;
}
首行首列 | 首行 | 首行 | 首行 | 首行 | 首行 |
行1首列 | 行1 | 行1 | 行1 | 行1 | 行1 |
行2首列 | 行2 | 行2 | 行2 | 行2 | 行2 |
行3首列 | 行3 | 行3 | 行3 | 行3 | 行3 |
行4首列 | 行4 | 行4 | 行4 | 行4 | 行4 |
行5首列 | 行5 | 行5 | 行5 | 行5 | 行5 |
http://blog.csdn.net/zhangxiaoxiang/archive/2007/10/10/1819230.aspx
相关文章推荐
- 自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行
- 自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行
- 自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行
- 自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行
- 自己对“用不同颜色显示表格奇偶行的例子”扩充了用不同颜色显示鼠标单击的行
- 网上找到一个用不同颜色显示表格奇偶行的例子
- 网上找到一个用不同颜色显示表格奇偶行的例子
- 网上找到一个用不同颜色显示表格奇偶行的例子
- 网上找到一个用不同颜色显示表格奇偶行的例子
- 网上找到一个用不同颜色显示表格奇偶行的例子
- 网上找到一个用不同颜色显示表格奇偶行的例子
- jquery 控制html页面表格当中奇偶行颜色不同 鼠标悬停变色
- JQuery来控制表格奇偶行的不同背景颜色显示
- CSS+HTML实例集合二,表格行颜色间隔显示,加有鼠标移入移出高亮效果,还有单击选中高亮再单击消除高亮
- 当鼠标经过表格数据行时颜色不同且奇偶行颜色也不同
- 当鼠标经过表格数据行时颜色不同且奇偶行颜色也不同 (纯CSS)
- 鼠标覆盖行高亮显示 奇偶行背景颜色不同 css+jquery Table
- 设置表格奇偶行不同颜色,鼠标划过变色的javascript代码
- Reporting Service技巧(一):表格中奇偶行不同颜色的设置
- 在Dynamics AX 中按条件分不同颜色显示表格中的记录