表现三种状态:默认、鼠标经过、鼠标选中
先看看效果:
说明:颜色可以自己调配。
table.jsp
<%
@ page contentType
=
"
text/html; charset=utf-8
"
language
=
"
java
"
import
=
"
java.sql.*
"
errorPage
=
""
%>
< script language ="javascript" src ="../common/js_css/styleToTables.js" type ="text/javascript" ></ script >
< table class ="list_table" align ="center" cellpadding ="1" cellspacing ="0" width ="96%" >
< tr >
< td >
< table id ="message_table" cellpadding ="3" cellspacing ="1" border ="0" width ="100%" align ="center" >
< tr >< th colspan ="4" class ="table_title" > 信息列表 </ th ></ tr >
<%
for ( int i = 0 ; i < 10 ; i ++ ){
%>
< tr >
< td width ="5%" > <% = i + 1 %> </ td >
< td > Retrieves the object that has the focus. </ td >
< td width ="10%" align ="center" > ison </ td >
< td width ="10%" > 2007-6-29 </ td >
</ tr >
<%
}
%>
</ table >
</ td >
</ tr >
</ table >
< script language ="JavaScript" >
tigra_tables( ' message_table ' , 1 , 0 , ' #ffffff ' , ' #D2FFD2 ' , ' #B3E1A3 ' , ' #54BB88 ' );
</ script >
< script language ="javascript" src ="../common/js_css/styleToTables.js" type ="text/javascript" ></ script >
< table class ="list_table" align ="center" cellpadding ="1" cellspacing ="0" width ="96%" >
< tr >
< td >
< table id ="message_table" cellpadding ="3" cellspacing ="1" border ="0" width ="100%" align ="center" >
< tr >< th colspan ="4" class ="table_title" > 信息列表 </ th ></ tr >
<%
for ( int i = 0 ; i < 10 ; i ++ ){
%>
< tr >
< td width ="5%" > <% = i + 1 %> </ td >
< td > Retrieves the object that has the focus. </ td >
< td width ="10%" align ="center" > ison </ td >
< td width ="10%" > 2007-6-29 </ td >
</ tr >
<%
}
%>
</ table >
</ td >
</ tr >
</ table >
< script language ="JavaScript" >
tigra_tables( ' message_table ' , 1 , 0 , ' #ffffff ' , ' #D2FFD2 ' , ' #B3E1A3 ' , ' #54BB88 ' );
</ script >
脚本下载:styleToTables.js