鼠标经过单元格变色问题

来源:百度知道 编辑:UC知道 时间:2024/06/07 07:14:08
下面的代码就是我要的效果,但是需要加载ActiveX控件才可以实现。想请教高手能不能给段不用加载ActiveX控件也可以实现的代码.谢谢了。

<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>

<body>
<table border="1px" width="100%">
<tr>
<th id="id_item1" onmouseover="this.bgColor='green'" onmouseout="this.bgColor=''" width="20%">
第一栏</th>
<th id="id_item1" onmouseover="this.bgColor='green'" onmouseout="this.bgColor=''" width="20%">
第二栏</th>
<th id="id_item1" onmouseover="this.bgColor='green'" onmouseout="this.bgColor=''" width="20%">
第三栏</th>
<th id="id_item1" onmouseover="this.bgColor='green'" onmouseout="this.bgColor=''" wid

<style>
.d_over{background-color:#307172;}
.d_out{background-color:#EFEFEF;}
</style>]
<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>

<body>
<table border="1px" width="100%">
<div class="d_out" onmouseover="this.className='d_over'" onmouseout="this.className='d_out'">中国</div></table>
</body>
网格内最好有DIV标签
然后把class="d_out" onmouseover="this.className='d_over'" onmouseout="this.className='d_out'"放到如上的位置

这个只是用了js吧。。怎么样要用ACTIVEX

你还可以用CSS实现

这段代码不需要加载ActiveX吧,传服务器绝对没问题