Please refresh once after "Run code".
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <title>jquery to do zebra effect exercises </title> <script language=" javascript "type=" text/ JavaScript "src=" Http://img.jb51.net/jslib/jquery/jquery-1.3.2.min.js "></script> <script language=" JavaScript "type=" Text/javascript > $ (function () {$ (". TestTable tr:even"). CSS ("Background", "#cccccc"); }) </script> </pead> <body> <table border= "1" class= "testtable" > <tr><td> Cloud Habitat District </td></tr> <tr><td> Cloud-dwelling community </td></tr> <tr><td> cloud-Habitat Community </td></ tr> <tr><td> Cloud Habitat </td></tr> <tr><td> Cloud Habitat </td></tr> <tr> <td> Cloud-dwelling community </td></tr> <tr><td> cloud-dwelling community;/td></tr> <tr><td> Cloud Community </td></tr> </table> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]