class id 区别
【1】、id是唯一的,一个元素只能有一个,不能重复class可以重复
<div>
<img src="" width="100%"/>
<div class="duihao" id="duihao11">
<img id="duihao1" name='A' src="" />
</div>
<div class="duihao" id="duihao22">
<img id="duihao2" name='B' src="" />
</div>
<div class="duihao" id="duihao33">
<img id="duihao3" name='C' src="" />
</div>
<div class="duihao" id="duihao44">
<img id="duihao4" name='D' src="" />
</div>
<div class="duihao" id="duihao55">
<img id="duihao5" name='E' src="" />
</div>
<div class="duihao" id="duihao66">
<img id="duihao6" name='F' src="" />
</div>
</div> <script>
$(function(){
$(".duihao").click(function(){
$(this).children().css("visibility","visible");
var a = $(this).children().attr("name");
setTimeout(function(){
window.location="url?func=cha&pubid={$pubid}&type="+a;
},1000);
});
})
</script>
class id 区别的更多相关文章
- Android @id和@+id区别
Android中的组件需要用一个int类型的id属性值来表示.id属性只能接受资源类型的值,也就是必须以@开头的值,例如,@id/abc.@+id/xyz等.如果在@后面使用“+”,表示当修改完某个布 ...
- html中NAME和ID区别
html中NAME和ID区别 NAME 的最大作用就是可以与服务端进行交互.Struts2中要设NAME的属性才能在Action中取到值,ID取不到. id与name的作用,作为标签的标识符,基本上是 ...
- CSS中的class与id区别及用法
转自http://www.divcss5.com/rumen/r3.shtml及http://www.jb51.net/css/35927.html 我们平常在用DIV CSS制作Xhtml网页页面时 ...
- Python基础学习Day6 is id == 区别,代码块,小数据池 ---->>编码
一.代码块 Python程序是由代码块构造的.块是一个python程序的文本,他是作为一个单元执行的. 代码块:一个模块,一个函数,一个类,一个文件等都是一个代码块. 而作为交互方式输入的每个命令都是 ...
- Guid与id区别
一.产生Guid的方法 1.SqlServer中使用系统自带的NEWID函数: select NEWID() 2.C#中,使用Guid类型的NewGuid方法: Guid gid; ...
- Objective-C中的instancetype和id区别
目录(?)[-] 有一个相同两个不同相同 Written by Mattt Thompson on Dec 10th 2012 一什么是instancetype 二关联返回类型related resu ...
- Android中@id与@+id区别
Android中的组件需要用一个int类型的值来表示,这个值也就是组件标签中的id属性值. id属性只能接受资源类型的值,也就是必须以@开头的值,例如,@id/abc.@+id/xyz等. 如果在@后 ...
- (转)Objective-C中的instancetype和id区别
有一个相同两个不同.相同 Written by Mattt Thompson on Dec 10th, Objective-C is a rapidly evolving language, in a ...
- Request.QueryString("id")与Request("id")区别
Request从几个集合取数据是有顺序的,从前到后的顺序依次是 QueryString,Form,最后是ServerVariables.Request对象按照这样的顺序依次搜索这几个集合中的变量,如果 ...
随机推荐
- python判断类型
方法 isinstance(obj, type) 示例 >>> print isinstance(, int) True >>> print isinstance( ...
- Windows 7 / Windows 10 安装 IPX/SPX
以我的系统为例: Windows 7/10 x64 首先下载 NWLINK IPX/SPX 驱动(这是 Microsoft 对 IPX/SPX 的实现.) http://pan.baidu.com/s ...
- 递归获取字符串内的所有图片src地址
// 递归调用获取字符串内所有的src地址 -(NSMutableArray *)getImageSrcUrlWithString:(NSString *)str withArray:(NSMutab ...
- DTMF Stresstesting
import threading,time,serial,sys from random import randrange port_snd=14 port_recv=2 recnt=0 ser_ ...
- JSON 字符串 与 java 对象的转换
jsonLib 经典文章:http://json-lib.sourceforge.net/xref-test/net/sf/json/TestJSONObject.html // 引入相应的包 //j ...
- 文件操作 & 重定向
实例:输入一些整数,求出它们的最小值.最大值和平均值(保留3位小数).输入保证这些数都是不超过1000的整数. 分析:需要注意的几点:数据个数不确定:数据大小不确定.简单分析后编程如下: #inclu ...
- html 标签自己居中
<div style="width: 200px; height: 200px; border: 1px solid red; margin: 0 auto;">< ...
- C# 类的介绍,参数传递,各种符号说法
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- AJax 学习笔记二(onreadystatechange的作用)
AJax 学习笔记二(onreadystatechange的作用) 当发送一个请求后,客户端无法确定什么时候会完成这个请求,所以需要用事件机制来捕获请求的状态XMLHttpRequest对象提供了on ...
- Trace Sys
ARM片上调试和跟踪解决方案(包括CoreSight体系结构,嵌入式跟踪宏单元(ETM),程序流程跟踪(PTM),ARM调试接口(ADI), 跟踪缓冲器(ETB),嵌入式交叉触发器(CTM)) Cor ...