DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> CSS样式里使用Javascript(onmouseover/onmouseout)2TITLE>
<META NAME&#61;"Generator" CONTENT&#61;"EditPlus">
<META NAME&#61;"Author" CONTENT&#61;"">
<META NAME&#61;"Keywords" CONTENT&#61;"">
<META NAME&#61;"Description" CONTENT&#61;"">
<style type&#61;"text/css">
table
{
background-color:#000000;
cursor:hand;
}
td
{
/*设置onmouseover事件*/
onmouseover: expression(οnmοuseοver&#61;function (){this.style.borderColor &#61;&#39;blue&#39;;this.style.color&#61;&#39;red&#39;;this.style.backgroundColor &#61;&#39;yellow&#39;});
/*设置onmouseout事件*/
onmouseout: expression(οnmοuseοut&#61;function (){this.style.borderColor&#61;&#39;&#39;;this.style.color&#61;&#39;&#39;;this.style.backgroundColor &#61;&#39;&#39;});
background-color:#ffffff;
}
style>
HEAD>
<BODY>
<TABLE cellspacing&#61;&#39;1px&#39; border&#61;&#39;1&#39;>
<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>
<HTML>
<HEAD>
<TITLE> CSS样式里使用Javascript(onmouseover/onmouseout)2TITLE>
<META NAME&#61;"Generator" CONTENT&#61;"EditPlus">
<META NAME&#61;"Author" CONTENT&#61;"">
<META NAME&#61;"Keywords" CONTENT&#61;"">
<META NAME&#61;"Description" CONTENT&#61;"">
<style type&#61;"text/css">
table
{
background-color:#000000;
cursor:hand;
}
td
{
/*设置onmouseover事件*/
onmouseover: expression(οnmοuseοver&#61;function (){this.style.borderColor &#61;&#39;blue&#39;;this.style.color&#61;&#39;red&#39;;this.style.backgroundColor &#61;&#39;yellow&#39;});
/*设置onmouseout事件*/
onmouseout: expression(οnmοuseοut&#61;function (){this.style.borderColor&#61;&#39;&#39;;this.style.color&#61;&#39;&#39;;this.style.backgroundColor &#61;&#39;&#39;});
background-color:#ffffff;
}
style>
HEAD>
<BODY>
<TABLE cellspacing&#61;&#39;1px&#39; border&#61;&#39;1&#39;>
<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>