[英]Font color won't change in ASP-classic site using javascript
我有一張桌子,當我鼠標懸停在這個單元格上時,背景和字體顏色應該改變,然后在我mouseOut時改回來,但由於某種原因,我似乎無法讓字體改變顏色。 我正在使用asp-classic和Internet explorer 8。
<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文件中
th.info {
color: navy;
background-color: white;
}
th.info.hl:hover {
color: #ffffff;
background-color: #E3E31B;
}
筆記
:hover
已經為此做了:hover
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.