Table alternating color CSS expression_css/html
Last Update:2016-05-16
Source: Internet
Author: User
The first behavior of the other colors, so write this expression
<ptml><pead><meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "><title> table CSS Test </title><style type=" Text/css "><!--tr {background-color: Expression (this.sectionrowindex==0? ") #AFAFAF ":((this.sectionrowindex%2==0)? "#FFF0F0": "#F0F0FF"));} --></style></pead><body bgcolor= "#FFFFFF" leftmargin= "0" topmargin= "0" ><table cellspacing= "1" > <tr> <td> form Test </td> <td> form test </td> <td> form Test </td> <td> table Test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test </td& Gt <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> <TD > Form Test </td> </tr> <tr> <td> form test </td> <td> form test </td> <td> form Test &L T;/td> <td> Forms Testing </td> <td> forms Testing </td> <td> forms Testing </td> </tr> <tr> <td> form test </td> <td> form test </td> <td> form Test </td> <td> Table Test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test </ td> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> <td> form Test </td> </tr> <tr> <td> form test </td> <td> form Test </td> <TD > Form Test </td> <td> form test </td> <td> form test </td> <td> form Test </td> </tr>< ;/table><p> </p><table cellspacing= "1" > <tr> <td width= "" "> </td> <td wi dth= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" ; </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "50" &Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> </tr> <tr> <td width=" "> </td> <td width=" > </td& Gt <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td widt h= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> </tr> <tr> <td width=" "> </td> <td width=" > </td& Gt <td Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= > </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </t d> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> &L T;TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td width= "> </td> </tr> <tr> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" + "> </td> <td wid th= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> ; <TD width= "&G"T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> </tr> <tr> <td width= "> </td> <td width=" "> </td> <td width=" "&G" T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> </tr> <tr> <td width= "> </td> <td width=" "> </td> <td width=" "&G" T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <tdWidth= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> </TR&G T <tr> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" ["> </td> <td w idth= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> </TR&G T <tr> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td widt h= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD width= > </td> <td width= "+" > </td> <td width= "" "> </td> </tr> <tr& Gt <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td widt h= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD Width= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <td width= "> </td> <td width=" "> </td> </tr> <tr> <td W idth= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> </tr> <tr> <td W idth= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> </tr> <tr> <td width=" &G " T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD WIdth= > </td> <td width= "" > </td> </tr> <tr> <td width= "> </td>" ; <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td widt h= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD width= > </td> <td width= "" > </td> </tr> <tr> <td width= "> </td&" Gt <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <td widt h= > </td> <td width= "+" > </td> <td width= "" "> </td> <td width=" > " </td> <TD width= "> </td> <td width=" "> </td> <td width=" ["> </td> <td w idth= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <td width= "> </td> </tr> <tr> <td width=" [>] </td> <td w idth= > </td> <td width= "" > </td> <td width= "" "> </td> <td width=" &G " T </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> </tr> <tr> <td width=" [>] </td> <td w Idth= ">"</td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> <td width=" "> </td> <td width=" [] > </td> <TD Width= "> </td> <td width=" "> </td> <td width=" 50 "> </td> <td width= Gt </td> <td width= "> </td> <td width=" "> </td> <td width=" "> </td> <TD width= "> </td> </tr></table><p> </p></body></ptml>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
More than a strong CSS
<ptml><pead><meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "><title> table CSS Test </title><style type=" Text/css "><!--#DataGrid1 TR { Background-color:expression (This.sectionrowindex = = 0?) "#FFCCCC": ((this.sectionrowindex% 2 = = 0)? "#FFF0F0": "#F0F0FF")); Color:expression (This.sectionrowindex = = 0?) "#FFFFFF": ""); Font-weight:expression (This.sectionrowindex = = 0?) "BOLD": ""); Tableselect:expression (This.sectionrowindex = = 0?) "": (onmouseover = function () {This.style.backgroundColor = (This.style.backgroundColor! = "#69cdff" ? "#69cdff": (This.sectionrowindex = = 0?) "#FFCCCC": (this.sectionrowindex% 2 = = 0?) "#FFF0F0": "#F0F0FF"))}, onmouseout = function () {This.style.backgroundColor = (this. Style.backgroundcolor! = "#69cdff"? "#69cdff": (This.sectionrowindex = = 0?) "#FFCCCC": (This.sectionrowindex%2 = = 0? "#FFF0F0": "#F0F0FF")))})} #DataGrid1 td {Background-color:expression (This.cellindex = = 0? (This.parentElement.sectionRowIndex = = 0?) "#FFCCCC": "#DDDDDD"): null)}. findareatable {font-size:12px; color: #333333; text-decoration:none; width:1024px; cursor:hand; Background-color: #FF FFFF; Vertical-align:middle; Text-align:center;} --></style></pead><body bgcolor= "#FFFFFF" leftmargin= "0" topmargin= "0" ><table cellspacing= "1" class= "findareatable" id= "DataGrid1" > <tr> <td> Form Test </td> <td> table Test </td> < td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </t D> <td> Forms Testing </td> <td> forms testing </td> </tr> <tr> <td> form testing </td> & lt;td> form Test ≪/td> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td& Gt </tr> <tr> <td> forms test </td> <td> form test </td> <td> form Test </td> <TD&G t; table test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test < /td> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> ; <td> form Test </td> </tr> <tr> <td> form test </td> <td> form Test </td> <td> Form test </td> <td> form test </td> <td> form test </td> <td> form test </td> </tr> <t r> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test </td> <td& gt; form Test </TD> <td> form Test </td> <td> form test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> forms test </td> <td> form test </td> <td> form Test </td> <TD&G t; table test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test < /td> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> ; <td> form Test </td> </tr> <tr> <td> form test </td> <td> form Test </td> <td> Form test </td> <td> form test </td> <td> form test </td> <td> form test </td> </tr> <t r> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test </td> <td& gt; form Test </td> <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> </ tr> <tr> <td> form test </td> <td> form test </td> <td> form test </td> <td> form measurement Trial </td> <td> form test </td> <td> form Test </td> </tr> <tr> <td> form Test </TD&G T <td> form test </td> <td> form test </td> <td> form test </td> <td> form Test </td> <TD > Form Testing </td> </tr></table></body></ptml>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]