WEB开发网
开发学院网页设计DivCss 在CSS样式表里使用JavaScript 阅读

在CSS样式表里使用JavaScript

 2006-10-25 19:22:01 来源:WEB开发网   
核心提示:CSS样式里使用javaScript(onmouSEOver/onmouseout)<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> CS

CSS样式里使用javaScript(onmouSEOver/onmouseout)

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

Tags:CSS 样式 表里

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