字体颜色赢得';使用javascript的ASP经典站点中的t更改
我有一个表格,当我把鼠标移到这个单元格上时,背景和字体的颜色应该会改变,然后当我把鼠标移到单元格外时会再改变,但由于某种原因,我似乎无法让字体改变颜色。我正在使用asp经典和internet explorer 8字体颜色赢得';使用javascript的ASP经典站点中的t更改,javascript,html,css,asp-classic,Javascript,Html,Css,Asp Classic,我有一个表格,当我把鼠标移到这个单元格上时,背景和字体的颜色应该会改变,然后当我把鼠标移到单元格外时会再改变,但由于某种原因,我似乎无法让字体改变颜色。我正在使用asp经典和internet explorer 8 <TH <%if boolHighlight=false then %>onMouseOver="this.bgColor='#E3E31B'; this.style.color='#ffffff';" onMouseOut="this.bgColor='#FFFFF
<TH <%if boolHighlight=false then %>onMouseOver="this.bgColor='#E3E31B'; this.style.color='#ffffff';" onMouseOut="this.bgColor='#FFFFFF'; this.style.color='#000000';" <%end if%>style="width: 9%; cursor: hand; border-right: none; align: center; vertical-align: center;"
title="Click to get info">
<font color="navy"><%= RS("ROLL_ID")%></font>
</TH>
在ASP文件中
<%
thClass = IIf(boolHighlight, "hl", "")
%>
<!-- later... -->
<th class="info <%=thClass%>" title="Click to get info"><%=RS("ROLL_ID")%></th>
注释
- 不要使用字体标签。永远
- 不要使用内联样式,而是使用CSS类和单独的CSS文件
- 不要在JavaScript中使用滚动效果。CSS
已为此制作:悬停
th.info {
color: navy;
background-color: white;
}
th.info.hl:hover {
color: #ffffff;
background-color: #E3E31B;
}