WEB开发网
开发学院网页设计DivCss css实现onmouseover和onmouseout等效果(css嵌入ja... 阅读

css实现onmouseover和onmouseout等效果(css嵌入javascript)兼容FireFox和IE

 2009-06-30 03:14:00 来源:WEB开发网   
核心提示:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmln

<!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=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>

Tags:css 实现 onmouseover

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接