如何实现将鼠标移到某行表格上时,表格会高亮度显示(反正能体现出视觉上的不同就行)? onmouseover()与onmouserout()事件控制使用CSS,或者直接就是控制Bgcolor 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <table><tr onmouseover="this.style.backgroundColor='ff0000'" onmouseout="this.style.backgroundColor='ffffff'"><td>ab</td></tr><tr onmouseover="this.style.backgroundColor='ff0000'" onmouseout="this.style.backgroundColor='ffffff'"><td>bc</td></tr> <table border=1><tr onmouseover='bgColor="#ffcc00";' onmouseout='bgColor="";'><td>11</td><td>12</td></tr><tr onmouseover='bgColor="#ffcc00";' onmouseout='bgColor="";'><td>21</td><td>22</td></tr></table> 移出时不记录最后鼠标所在的行:<table width=100% bgcolor=cccccc onmouseout="select_row(null)"><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr></table><script language="javascript">var theCurrentTr;function select_row(obj){if(theCurrentTr!=null) theCurrentTr.bgColor="";theCurrentTr=obj;if(theCurrentTr!=null) theCurrentTr.bgColor="blue";}</script><br><br>移出时还记录最后鼠标所在的行:<table width=100% bgcolor=cccccc><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr><tr id="row0" onmouseover="select_row(this)"><td>...</td></tr></table> ClientScript.RegisterStartupScript怎么改写成javascript语句 JS高人帮助,有没有方法取得事件类型 急急急 !!!!Init()里 如何得到xsl元素的值 急问,关于splice的问题 关于滚动效果 JS如何实现延时加载?关于根据IP跳转相应的城市网站代码 如何使链接失效?? 现金求JS函数转换C#函数 有关一个网页打开和关闭的问题 请教该软件用了什么技术? 如何把javascript的非法字符加上转义符号? 怎样才能实现这个论坛界面上关闭左边菜单栏,右边自动填充?
<tr onmouseover="this.style.backgroundColor='ff0000'" onmouseout="this.style.backgroundColor='ffffff'"><td>ab</td></tr>
<tr onmouseover="this.style.backgroundColor='ff0000'" onmouseout="this.style.backgroundColor='ffffff'"><td>bc</td></tr>
<tr onmouseover='bgColor="#ffcc00";' onmouseout='bgColor="";'><td>11</td><td>12</td></tr>
<tr onmouseover='bgColor="#ffcc00";' onmouseout='bgColor="";'><td>21</td><td>22</td></tr>
</table>
<table width=100% bgcolor=cccccc onmouseout="select_row(null)">
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
</table>
<script language="javascript">
var theCurrentTr;
function select_row(obj)
{
if(theCurrentTr!=null) theCurrentTr.bgColor="";
theCurrentTr=obj;
if(theCurrentTr!=null) theCurrentTr.bgColor="blue";}
</script><br>
<br>
移出时还记录最后鼠标所在的行:
<table width=100% bgcolor=cccccc>
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
<tr id="row0" onmouseover="select_row(this)"><td>...</td></tr>
</table>