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对象按照这样的顺序依次搜索这几个集合中的变量,如果 ...
随机推荐
- [PCL]1 PCL点云库安装
1.安装文件下载:官网,我还是比较喜欢别人编译好的安装包啊,哈哈. http://www.pointclouds.org/downloads/windows.html 2.傻瓜式安装(下面的依赖项都集 ...
- mini install centOS log
no ifconfig yum install net-tools ------------------------------------------------------------------ ...
- Mysql note
from w3cschool.com 1,modify the segment of table alter table table_name add/drop var_name [var_type] ...
- mysql:innodb monitor(show engine innodb status)探秘
在旧的版本里面是show innodb status命令,新版本后改动了一些:show engine innodb status; 我们最熟悉的,应当就是show innodb status命令,可以 ...
- iOS6:在你的企业系统中支持Passbook
前言 这是一篇翻译,感谢Jonathan Tang. 原文地址:iOS 6 Tutorial: Supporting Passbook within Your Enterprise Systems 正 ...
- 转:Jmeter之Bean shell使用(二)
上一篇Jmeter之Bean shell使用(一)简单介绍了下Jmeter中的Bean shell,本文是对上文的一个补充,主要总结下常用的几种场景和方法,相信这些基本可以涵盖大部分的需求.本节内容如 ...
- C++字符串(String)
字符串的声明: string s; string str="abcdefg"; char ch[]="abcdefg"; //使用string类型初始化另一个s ...
- [转]jQueryEasyUI Messager基本使用
一.jQueryEasyUI下载地址 http://www.jeasyui.com/ 二.jQueryEasyUI Messager基本使用 1.$.messager.alert(title, msg ...
- Python和Ruby开发中源文件中文注释乱码的解决方法(Eclipse和Aptana Studio3均适用)
Eclipse的设置(Aptana Studio3与Eclipse基本完全相同,此处略) window->preferences->general->editors->text ...
- Java基础(6):foreach 方法遍历数组
foreach 并不是 Java 中的关键字,是 for 语句的特殊简化版本,在遍历数组.集合时, foreach 更简单便捷.从英文字面意思理解 foreach 也就是“ for 每一个”的意思,那 ...