JS-jQuery:百科
| ylbtech-JS-jQuery:百科 |
| 1.返回顶部 |
- 中文名:极快瑞
- 外文名:jQuery
- 核心理念:write less,do more
- 发布时间:2006年1月
- 发布人:John Resig
- 发布地点:美国纽约
- 最新版本:jQuery 3.4.1
- 第一个版本:jQuery 1.0(2006年1月)
- 内部引入库:Sizzle.js
| 2.返回顶部 |
发展历程
|
1
2
3
4
5
6
7
|
Behaviour.register({ '#example li': function(e){ e.onclick = function(){ this.parentNode.removeChild(this); } }}); |
|
1
2
3
4
5
|
$('#example li').bind('click',function(){ this.parentNode.removeChild(this);}); 第二个例子是为不同的元素注册不同的事件: |
|
1
2
3
4
5
6
7
8
9
10
11
12
|
Behaviour.register({ 'b.someclass' : function(e){ e.onclick = function(){ alert(this.innerHTML); } }, '#someid u' : function(e){ e.onmouseover = function(){ this.innerHTML = "BLAH!"; } }}); |
|
1
2
3
4
5
6
|
$('b.someclass').bind('click',function(){ alert(this.innerHTML);});$('#someid u').bind('mouseover',function(){ this.innerHTML = 'BLAH!';}); |
|
1
2
3
4
5
6
7
8
9
10
11
12
|
Behaviour.register({ '#foo ol li': function(a) { a.title = "List Items!"; a.onclick = function(){ alert('Hello!'); }; }, '#foo ol li.tmp': function(a) { a.style.color = 'white'; }, '#foo ol li.tmp .foo': function(a) { a.style.background = 'red';}}); |
|
1
2
3
4
5
6
7
|
$('#foo ol li') .set('title','List Items!') .bind('click',function(){ alert('Hello!'); }) .select('.tmp') .style('color','white') .select('.foo') .style('background','red'); |
|
1
2
3
4
5
6
7
8
9
10
|
//1.4.2$("table").delegate("td", "hover", function(){ $(this).toggleClass("hover");});//1.3.2$("table").each(function(){ $("td", this).live("hover", function(){ $(this).toggleClass("hover"); });}); |
编程开发
语言特点
工作原理
语言基础
选择器
|
1
|
$("p") |
|
1
|
$("#test") |
|
1
|
$(".test") |
事件处理
|
1
|
$("p").click(); |
|
1
2
3
|
$("p").click(function(){ // 动作触发后执行的代码!!}); |
|
1
2
3
|
$("p").click(function(){ $(this).hide();}); |
|
1
2
3
|
$("p").dblclick(function(){ $(this).hide();}); |
|
1
2
3
|
$("#p1").mouseenter(function(){ alert("You entered p1!");}); |
|
1
2
3
|
$("#p1").mouseleave(function(){ alert("Bye! You now leave p1!");}); |
|
1
2
3
|
$("#p1").mousedown(function(){ alert("Mouse down over p1!");}); |
|
1
2
3
|
$("#p1").mouseup(function(){ alert("Mouse up over p1!");}); |
|
1
2
3
4
5
6
|
$("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now leave p1!");}); |
|
1
2
3
|
$("input").focus(function(){ $(this).css("background-color","#cccccc");}); |
|
1
2
3
|
$("input").blur(function(){ $(this).css("background-color","#ffffff");}); |
技术应用
学习指南
语言评价
| 3.返回顶部 |
| 4.返回顶部 |
| 5.返回顶部 |
| 6.返回顶部 |
![]() |
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
JS-jQuery:百科的更多相关文章
- js,jquery,css,html5特效
包含js,jquery,css,html5特效,源代码 本文地址:http://www.cnblogs.com/roucheng/p/texiao.html 2017新年快乐特效 jQuery最新最全 ...
- Js/Jquery获取iframe中的元素
转载: Js/Jquery获取iframe中的元素 - - ITeye技术网站http://java-my-life.iteye.com/blog/1275205 在web开发中,经常会用到ifram ...
- js/jquery/html前端开发常用到代码片段
1.IE条件注释 条件注释简介 IE中的条件注释(Conditional comments)对IE的版本和IE非IE有优秀的区分能力,是WEB设计中常用的hack方法.条件注释只能用于IE5以上,IE ...
- js jquery 页面加载初始化方法
js jquery 页面加载初始化方法 一.js页面加载初始化方法 // 1.在body里面写初始化方法. <body onload='init()'> </body> < ...
- js jquery 选择器总结
js jquery 选择器总结 一.原始JS选择器. id选择器:document.getElementById("test"); name选择器:document.getElem ...
- [JS]jQuery,javascript获得网页的高度和宽度
[JS]jQuery,javascript获得网页的高度和宽度网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeigh ...
- spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js...
问题:spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js... web.x ...
- js jquery中 的数据类型
任何一门语言, buguan 是动态的, 还是像C语言的, 都有严格的 类型 "概念的", 这个是由于 编译器和解释器要求的, 需要的. 所以在是使用像 js, jquey ,ph ...
- paip.提升效率--数据绑定到table原理和流程Angular js jquery实现
paip.提升效率--数据绑定到table原理和流程Angular js jquery实现 html #--keyword 1 #---原理和流程 1 #----jq实现的代码 1 #-----An ...
- JS Jquery去除数组重复元素
js jquery去除数组中的重复元素 第一种:$.unique() 第二种: for(var i = 0,len = totalArray_line.length;i < len;i++) { ...
随机推荐
- Codeforces 510C (拓扑排序)
原题:http://codeforces.com/problemset/problem/510/C C. Fox And Names time limit per test:2 seconds mem ...
- AGC037C Numbers on a Circle
题目大意 给你一个序列a和序列b 每次操作是a[i]+=a[i-1]+a[i+1] 问a经过最少几次操作可以得到b 分析 用堆维护a 每次取出最大的 撤销操作直到不能撤销 将新数放入堆 不断维护即可 ...
- linux远程管理器 - xshell和xftp使用教程(zhuan)
准备好连接linux服务器的工具,推荐用xshell和xftp. xshell 是一个强大的安全终端模拟软件,它支持SSH1, SSH2, 以及Microsoft Windows 平台的TELNET ...
- 11. Jmeter-后置处理器二
jmeter-后置处理器介绍与使用二 今天我们接着讲 JSR223 PostProcessor Debug PostProcessor JDBC PostProcessor Result Status ...
- urllib爬取实例
#汉字转码.多个参数拼接 from urllib import request base_url = "http://www.baidu.com/s?" content = inp ...
- python 装饰器 对类和函数的装饰
#装饰器:对类或者函数进行功能的扩展 很多需要缩进的没有进行缩进'''#第一步:基本函数def laxi(): print('拉屎')#调用函数laxi()laxi() print('======= ...
- 3.jmeter jsr232 脚本获取当前测试的正在活动的线程数
jsr232 groovy 脚本获取当前测试的正在活动的线程数 (需要选择 groovy类型, 如果使用beanshell或者javascript,请根据其语法稍作修改即可) import org.a ...
- txt文本程序 打开python文件 另存为原来的文件名,不能覆盖原来的文件解决
txt文本程序 打开python文件 另存为原来的文件名,不能覆盖原来的文件 如:1.py文件用txt文本程序打开后,另存为 1.py,保存完毕后,不覆盖1.py文件,会生成 1.py.txt文件 原 ...
- springboot 项目启动脚本
springboot项目启动可通过下面的shell脚本启动. startup.sh app=order-service-rest.jar appout=logs/${app/.jar/.out} ap ...
- Java原理领悟-线程池(Executor)
线程池全面解析 什么是线程池? 很简单,简单看名字就知道是装有线程的池子,我们可以把要执行的多线程交给线程池来处理,和连接池的概念一样,通过维护一定数量的线程池来达到多个线程的复用. 线程池的好处 我 ...
