表格放上去变色代码 <tr onmouseover="this.style.backgroundColor='#F6F6A0';"onmouseout="this.style.backgroundColor='';"></tr>
或者采用JavaScript实现 //改变背景色 function ChangeBg(color){ obj=document.getElementById("tab_list").getElementsByTagName("tr"); for(var i=0;i<obj.length;i++){ obj[i].onmouseover=function(){ this.style.backgroundColor=color;} obj[i].onmouseout=function(){ this.style.backgroundColor="";} } } 然后<table class="xx_2" id="tab_list">调用 或者css实现<table class="tabledb"> .tabledb tr{ background-color:expression('#eff3f6,#FFFFFF'.split(',')[rowIndex%2]); } .tabledb tr:hover { background:#F6F6A0; } |
Music
Announcement
New Visitor
About/Statistics
用户名称:陈永勤 会员等级:普通会员 实时积分:1163 日志总数:57 评论数量:83 建立时间:2009年03月20日 |