css实现onmouseover和onmouseout等效果(css嵌入javascript)兼容FireFox和IE
css实现onmouseover和onmouseout等效果css嵌入javascript兼容FireFox和IE,lt;!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdgt;lt;htmlxmlns=http://www.w3.org/1999/xhtmlgt;lt;headgt;lt;metahttp-equiv=Conten
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table
{
background-color:#000000;
cursor:hand;
}
td
{
event: expression(
onmouseover=function (){
this.style.borderColor ='blue';
this.style.color='red';this.style.backgroundColor ='yellow';
},
onmouseout=function (){
this.style.borderColor='';
this.style.color='';
this.style.backgroundColor ='';
}
);
background-color:#ffffff;
}
td:hover{
background-color:#3366CC;
}
</style>
<title>css实现onmouseover和onmouseout等效果(css嵌入javascript)</title>
<!-- hover for FireFox only -->
<!-- expression for IE only -->
</head>
<body>
<table width="200" border="1">
<tr>
<th scope="col"> </th>
<th scope="col"> </th>
<th scope="col"> </th>
<th scope="col"> </th>
<th scope="col"> </th>
<th scope="col"> </th>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>