光棒效果:建立一个表格,鼠标放到哪一行,哪一行的颜色就改变,鼠标离开那一行,那一行的颜色就恢复到原来的颜色

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head> <body>
<table width="" border="" cellspacing="" cellpadding="">
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
<td height="">&nbsp;</td>
</tr>
</table>
</body>
<script type="text/javascript"> function shangqu(a)
{
a.style.backgroundColor="red";
}
function likai(b)
{
b.style.backgroundColor="#FFFF66";
}
</script> </html>

HTML——JAVASCRIPT——光棒效果的更多相关文章

  1. 使用javaScript和JQuery制作经典面试题:光棒效果

    使用javaScript与jQuery添加CSS样式的区别和步骤 使用javaScript制作光棒效果 --首先是javaScript <script> $(function () { v ...

  2. webform 光棒效果,删除操作弹出确定取消窗口

    鼠标移入onmouseover和鼠标移出onmouseout,代码里没大写我这也就不大写了.那首先,我们得获取Class为tr_item里的所有东西,也就是项标签里的数据.然后呢,我们定义一个oldC ...

  3. jquery添加光棒效果的各种方式以及简单动画复杂动画

    过滤器.绑定事件.动画   一.基本过滤器 语法 描述 返回值 :first 选取第一个元素 单个元素 :last 选取最后一个元素 单个元素 :not(selector) 选取去除所有与给定选择器匹 ...

  4. asp.net操作GridView添删改查的两种方法 及 光棒效果

    这部份小内容很想写下来了,因为是基础中的基础,但是近来用的比较少,又温习了一篇,发现有点陌生了,所以,还是写一下吧. 方法一:使用Gridview本身自带的事件处理,代码如下(注意:每次操作完都得重新 ...

  5. HTML7常用的类型刮刮乐 光棒效果

    常用的类型: 1.数学: Math.ceil():天花板数 Math.floor():地板数 Math.round():四舍五入取整数 Math.random():生成0-1之间的随机数   2.日期 ...

  6. Jquery实现光棒效果

    <script type="text/javascript"> $(function () { var $bac; $("#d1 tr").hove ...

  7. jQuery中.bind() .live() .delegate() .on()的区别 和 三种方式写光棒事件 动画

    地狱的镰刀 bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数. $("a").bind("click",function(){ ...

  8. 用js写出光棒效应的两种方法与jquery的两中方法

    <script src="js/jQuery1.11.1.js" type="text/javascript"></script> &l ...

  9. JavaScript--------------------jQuery中.bind() .live() .delegate() .on()的区别 和 三种方式写光棒事件 动画

    bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数. $("a").bind("click",function(){alert( ...

随机推荐

  1. SVN中tag branch trunk用法详解

    SVN中tag branch trunk用法详解 2010-05-24 18:32 佚名 字号:T | T 本文向大家简单介绍一下SVN中tag branch trunk用法,SVN中tag bran ...

  2. EF查询数据库框架的搭建

    一个简单的EF查询框架除了运行项目外,大概需要5个类库项目,当然这个不是一定要这样做,这可以根据自己的需要设置有多少个项目.这里介绍的方法步骤只适合EF零基础的人看看就是了. 在开始之前,先建立一个运 ...

  3. EasyUI时间格式化

    changeDateFormatNodate: function (cellval) { var date = new Date(parseInt(cellval.replace("/Dat ...

  4. OCMOCM

    14年,OCM考试费12000 15年,考试费19800 对于我来说,1,2年之后是否换工作还是个未知数 在本单位考这个貌似没什么用处,工资也不会突然就涨很多 跳槽的话,专门做数据库感觉压力还挺大 年 ...

  5. exist和not exist用法

    参考:http://wenku.baidu.com/view/577f4d49cf84b9d528ea7a6f.html    //这个讲的很详细 引用自:http://chenling1018.bl ...

  6. java static关键字

    方便在没有创建对象的情况下来进行调用(方法/变量). 很显然,被static关键字修饰的方法或者变量不需要依赖于对象来进行访问,只要类被加载了,就可以通过类名去进行访问. static可以用来修饰类的 ...

  7. struts2 中 Session的使用简介

    在Struts2里,如果需要在Action中使用到session,可以使用下面两种方式: 通过ActionContext 类中的方法getSession得到 Action实现org.apache.st ...

  8. ListView的使用——聊天窗口

    一.步骤 1.在layout创建两个布局,分别是自己的回答条,和对方的回答条. 2.创建ChatMessage这个类,成员变量有头像地址.聊天内容.所属类型(假设1表示对方,2表示自己). 3.创建C ...

  9. Ubuntu配置OpenGL环境

    建立基本编译环境 sudo apt-get install build-essential 安装OpenGL Library sudo apt-get install libgl1-mesa-dev ...

  10. Linux的启动流程以及GRUB详解

     一.Linux引导和启动流程       概述,计算机电源接通后通过BISO之后,没有问题,就会去硬盘上找到MBR(Main Boot Record 主引导记录区)位于整个硬盘的0磁道0柱面1扇区, ...