用 table 显示 n 条记录,每 3 行换一次颜色,即 1 ,2 ,3 用红色字体,4 ,5, 6 用绿色字体,7 ,8 ,9 用红颜色字体
<!DOCTYPE html>
<html>
<head>
<title>颜色换行</title>
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<table id="tb1">
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
<tr><td>5</td></tr>
<tr><td>6</td></tr>
<tr><td>7</td></tr>
<tr><td>8</td></tr>