欢迎来到福编程网,本站提供各种互联网专业知识!

js兼容标准的表格变色效果

发布时间:2008-06-28 作者: 来源:转载
符合标准的表格变色的js代码





*{margin:0;padding:0;font-size:14px}
body{text-align:center;}
#btn{list-style:noneinside;width:210px;margin:10pxauto;clear:both;}
#btnli{float:left;width:100px;line-height:20px}
#btnlia{display:block;text-decoration:none;color:#333333}
#gray{background:#f5f5f5;cursor:pointer}
#green{background:#D7ECDE;cursor:pointer}
table{border-collapse:collapse;width:70%;margin:10pxauto}
td{line-height:100%;height:24px;line-height:24px;padding:04px}
tda{text-decoration:none;color:#333;display:block;}
#tab_graytd{border:1pxsolid#B9B9B9;background:#F2F2F2;}
#tab_greentd{border:1pxsolid#95CCA7;background:#EBF5EE;}
#tab_graytd:hover,#tab_greentd:hover{background:#fff;}




gray
green



Table
Table
Table


hello
hello
hello


hello
hello
hello



functiongreen(){
document.getElementById("tab_gray").id="tab_green";
}
functiongray(){
document.getElementById("tab_green").id="tab_gray";
}



相关推荐