| 表格样式请教! |
| [ 来源:ITWENKU 时间:2006-9-25 11:42:28 | 浏览:185人次
] |
| |
我在做一个数据录入程序,通过table装载录入项目,请问如何实现当鼠标移到某一行后,该行变色。
设置tr的鼠标事件,大致如下 onmouseover="this.className='over';" onmouseout="this.className='out';"
look~~
.tabtr{ background-color:expression((this.sectionRowIndex%2==0)?"#000000":"#FFFFFF"); }
或者是在style="onmouseover="this.background='#000000'" onmouseout="this.background=''"
try: ==============
<style> table { background-color:#000000; cursor:hand; width:100%; } td { /*设置onmouseover事件*/ onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgroundColor ='yellow'});
/*设置onmouseout事件*/ onmouseout: expression(onmouseout=function (){this.style.borderColor='';this.style.color='';this.style.backgroundColor =''}); background-color:#ffffff; } </style> </HEAD>
<TABLE cellspacing='1px' border='1'> <TR> <TD > </TD> </TR> <TR> <TD > </TD> </TR> </TABLE>
|
|
 |
最新更新 |
|