<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> color table example </title>
<Script language = "JavaScript">
Function changecolor (ROW ){
Document. getelementbyid (ROW). style. backgroundcolor = '# ccccff ';
}
Function resetcolor (ROW ){
Document. getelementbyid (ROW). style. backgroundcolor = '';
}
</SCRIPT>
</Head>
<Body>
<Table width = "200" border = "1" cellpadding = "1" cellspacing = "1">
<Tr>
<TH> school </Th>
<TH> major </Th>
<TH> Number of Students </Th>
</Tr>
<Tr align = "center" id = "row1" onmouseover = "changecolor ('row1')" onmouseout = "resetcolor ('row1')">
<TD> peking university </TD>
<TD> law </TD>
<TD> 200 </TD>
</Tr>
<Tr align = "center" id = "row2" onmouseover = "changecolor ('row2')" onmouseout = "resetcolor ('row2')">
<TD> Hunan rural university </TD>
<TD> Computer </TD>
<TD> 500 </TD>
</Tr>
<Tr align = "center" id = "row3" onmouseover = "changecolor ('row3')" onmouseout = "resetcolor ('row3')">
<TD> NPC </TD>
<TD> Economic </TD>
<TD> 600 </TD>
</Tr>
</Table>
</Body>
</Html>