特效:CSS+Javascript实现表格背景变色

时间:2008-10-06 10:44:05  来源:第二电脑网上收集  作者:

  第二电脑网导读:; CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""><style type="text/css">table{ background-color:#000000; cursor:hand;
  正文:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Css样式里使用JavaScript(onmouSEOver/onmouseout)2</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">

<style type="text/css">
table
{

 background-color:#000000;
 cursor:hand;
}

td
{
  /*设置onmouseover事件*/
  onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgroundColor ='yellow'});

  /*设置onmouseout事件*/
  onmouseout: expression(onmouseout=function (){this.style.borderColor='';this.style.color='';this.style.backgroundColor =''});
  background-color:#ffffff;
}
</style>
</HEAD>

<BODY>
<TABLE cellspacing='1px' border='1'>
<TR >
 <TD >1......    </TD>
 <TD>2......   </TD>
 <TD>3......   </TD>
</TR>
<TR >
 <TD >4......    </TD>
 <TD>5......   </TD>
 <TD>6......   </TD>
</TR>
</TABLE>
</BODY>
</HTML>

特效:CSS+Javascript实现表格背景变色》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Page/css/2008-10-06/1900.html


关键字:

关于《特效:CSS+Javascript实现表格背景变色》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td