因为样式表中的background-color属性覆盖了tr的bgColor属性了

解决方案 »

  1.   

    但是,这样写可以的:
    <tr  onmouseover="this.bgColor='#ccffcc'"  bgcolor="#dddddd">
    为什么换成
    <tr  onmouseover="this.bgColor='@ccffcc'"  class="ListItemAlt">
    就不行了呢
      

  2.   

    这个原因还是上面说的那个原因
    使用class也就是使用样式表来制定颜色,使用样式表来制定颜色,优先级别要高于是用bgcolor来指定颜色
      

  3.   

    .ListItemAlt
    {
        background-color: #eeeeee;
        border-bottom: dimgray;
        border-left: dimgray 1px solid;
        color: black;
        font-family: 宋体,黑体;
        font-size: 11px;
        padding-left: 5px;
        height:20px;
    }
    .ListItemAltNew
    {
        background-color: #eeeeee;
        border-bottom: dimgray;
        border-left: dimgray 1px solid;
        color: black;
        font-family: 宋体,黑体;
        font-size: 11px;
        padding-left: 5px;
        height:20px;
    }
    <tr  onmouseover="this.className='ListItemAltNew'"  class="ListItemAlt">
      

  4.   

    在ListItemAltNew里面把color: black;改为color:#ccffcc