注册 登录
编程论坛 JavaScript论坛

[求助]如何实现如同163邮箱中的,当鼠标放上去的时候该行变色?

hangxj 发布于 2006-09-28 16:03, 1064 次点击
[求助]如何实现如同163邮箱中的,当鼠标放上去的时候该行变色?

谢谢了
7 回复
#2
live412006-09-28 17:06
javascript里面, td的事件里面, onMouseOver
#3
bingxue23322006-09-28 20:29
[CODE]

<table border="1" width="300px">
<tr>

<td height="30" onmouseover="this.style.backgroundColor='#FF0000'"

onmouseout="this.style.backgroundColor=''" >
abc
</td>

</tr>
<tr>

<td height="30" onmouseover="this.style.backgroundColor='#FFFF00'"

onmouseout="this.style.backgroundColor=''">
abcd
</td>

</tr>
<tr>

<td height="30" onmouseover="this.style.backgroundColor='#FF00FF'"

onmouseout="this.style.backgroundColor=''">
abcde
</td>

</tr>

</table>

[/CODE]
#4
hangxj2006-09-29 09:53
谢谢大家的帮忙
#5
hangxj2006-09-29 10:05

还想再问一下,再前面的甚而上
如何让用户选择左边的筛选框后让其又变另一色?我加了个onclick 不行,晕~~~
谢谢大家先!

#6
honkerman2006-10-07 00:14

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<table border="1" width="135" >
<tr><td width="125" height="30" onmouseover="this.style.backgroundColor='#FF0000'" onmouseout="this.style.backgroundColor=''" >
<a href="http://baidu.com" target="_blank" style="color:" onclick="this.style.backgroundColor='#FF0000'" >abc</a></td>
</tr>
<tr><td height="30" onmouseover="this.style.backgroundColor='#FFFF00'" onmouseout="this.style.backgroundColor=''">
<a href="http://baidu.com" target="_blank" style="color:" onclick="this.style.backgroundColor='#FF0000'">abcd</a></td>
</tr>
<tr><td height="30" onmouseover="this.style.backgroundColor='#FF00FF'" onmouseout="this.style.backgroundColor=''">
<a href="http://baidu.com" target="_blank" style="color:" onclick="this.style.backgroundColor='#FF0000'" >abcde </a></td>
</tr></table>
</body>
</html>
这样的?

[此贴子已经被作者于2006-10-7 0:16:29编辑过]

#7
hangxj2006-10-12 09:20
这个在上面就有人给出了,不过还是谢谢.

我现在想要的是我在这个基础之上,加上一个复选框
如何让用户选择左边的复选框后让其又变另一色?我加了个onclick 不行,晕~~~
谢谢大家先!

就是说要完全按照网易邮箱的一样.
#8
javaxingxing2010-03-27 10:50
顶贴  谢谢帮我解决问题了
1