HTML——JAVASCRIPT——光棒效果
光棒效果:建立一个表格,鼠标放到哪一行,哪一行的颜色就改变,鼠标离开那一行,那一行的颜色就恢复到原来的颜色
<!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=""> </td>
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
</tr>
<tr onmouseover="shangqu(this)" onmouseout="likai(this)" bgcolor="#FFFF66">
<td height=""> </td>
<td height=""> </td>
<td height=""> </td>
<td height=""> </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——光棒效果的更多相关文章
- 使用javaScript和JQuery制作经典面试题:光棒效果
使用javaScript与jQuery添加CSS样式的区别和步骤 使用javaScript制作光棒效果 --首先是javaScript <script> $(function () { v ...
- webform 光棒效果,删除操作弹出确定取消窗口
鼠标移入onmouseover和鼠标移出onmouseout,代码里没大写我这也就不大写了.那首先,我们得获取Class为tr_item里的所有东西,也就是项标签里的数据.然后呢,我们定义一个oldC ...
- jquery添加光棒效果的各种方式以及简单动画复杂动画
过滤器.绑定事件.动画 一.基本过滤器 语法 描述 返回值 :first 选取第一个元素 单个元素 :last 选取最后一个元素 单个元素 :not(selector) 选取去除所有与给定选择器匹 ...
- asp.net操作GridView添删改查的两种方法 及 光棒效果
这部份小内容很想写下来了,因为是基础中的基础,但是近来用的比较少,又温习了一篇,发现有点陌生了,所以,还是写一下吧. 方法一:使用Gridview本身自带的事件处理,代码如下(注意:每次操作完都得重新 ...
- HTML7常用的类型刮刮乐 光棒效果
常用的类型: 1.数学: Math.ceil():天花板数 Math.floor():地板数 Math.round():四舍五入取整数 Math.random():生成0-1之间的随机数 2.日期 ...
- Jquery实现光棒效果
<script type="text/javascript"> $(function () { var $bac; $("#d1 tr").hove ...
- jQuery中.bind() .live() .delegate() .on()的区别 和 三种方式写光棒事件 动画
地狱的镰刀 bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数. $("a").bind("click",function(){ ...
- 用js写出光棒效应的两种方法与jquery的两中方法
<script src="js/jQuery1.11.1.js" type="text/javascript"></script> &l ...
- JavaScript--------------------jQuery中.bind() .live() .delegate() .on()的区别 和 三种方式写光棒事件 动画
bind(type,[data],fn) 为每个匹配元素的特定事件绑定事件处理函数. $("a").bind("click",function(){alert( ...
随机推荐
- Android漫游记(1)---内存映射镜像(memory maps)
Android系统内核基于Linux2.6+内核,因此,其在进程内存管理方面的非常多机制和Linux是非常相像的.首先,让我们来看一个典型的Android进程的内存镜像(App进程和Native本地进 ...
- RMAN备份各种物理文件
RMAN运行脚本的方式:RMAN TARGET / @backup_db.rmanRMAN TARGET / cmdfile=backup_db.rman在RMAN中执行操作系统中保存的脚本:RMAN ...
- C#实训 打字游戏
StatusStrip控件 状态条 =进度条+标签 等集合体
- 目标管理剖析与实践– 献给追梦的人 (转)
好久没写日志了. 最近总算在忙碌的日子中小小的松了一口气, 过来补起这几个月的空缺. 上次写的Cover Letter & Resume 重点诠释 - 深度剖析没想到居然超过了一万的阅读量 ...
- Android使用webService
在android中使用webservice,首先要导入Android webservice支持包 ksoap2-android-assembly-3.3.0-jar-with-dependencies ...
- 高效的SQL分页存储过程
CREATE PROCEDURE SP_CommonPageList @Fields VARCHAR(500), @From VARCHAR(1000), @Condition VARCHAR(100 ...
- MySQL基础之 path环境变量的作用 (科普)
在谈mysql配置环境变量之前,先谈一下windows环境变量的作用,有时候在windows cmd窗口运行命令时,经常会出现“XXX不是内部或外部命令的提示” 原因是系统没有找到执行相应命令的文件( ...
- HDU 5729 - Rigid Frameworks
题意: 对于一个由n*m个1*1的菱形组成可任意扭曲的矩形(姑且这么说),求添加斜线*(两种)让菱形变成正方形,使得整个矩形固定且无法扭曲的方案数. 分析: n*m的矩形有如下性质:( 平 ...
- jeasyui制作计划-搭建php运行环境
1.参考链接: http://jingyan.baidu.com/article/154b46315242b328ca8f4101.html http://jingyan.baidu.com/arti ...
- logfile提示stale错误解决方法
产生该错误的原因解释如下: Explanation: ============ A stale redo log file is one that Oracle believes might be i ...