首页 > 其他分享 >jQuery 学习列表

jQuery 学习列表

时间:2023-07-08 21:34:55浏览次数:46  
标签:jQuery selector elements name 列表 学习 set element matched


jQuery   学习列表

 

1、

Events



Page Load



$. ready ( fn() )

Specify a function to execute when the DOM is fully loaded.



 

2、

Selectors



Basics



#id

Selects a single element with the given id attribute.



element

Selects all elements with the given tag name.



.class, .class.class

Selects all elements with the given class.



*

Selects all elements.



selector1, selector2

Selects the combined results of all the specified selectors.



 

3、

Attributes



Attributes



str. attr ( name ) | (name , value ) ) 1.6*

Get the value of an attribute for the first element in the set of matched elements.



$. attr ( name, val ), . attr ( map ), . attr ( name, fn(index, attr) )

Set one or more attributes for the set of matched elements.



$. removeAttr ( name )

Remove an attribute from each element in the set of matched elements.



$. prop ( name ) 1.6+

Get the value of a property for the first element in the set of matched elements.



$. removeProp ( name ) 1.6+

Remove a property for the set of matched elements.



 

 4、

Traversing



Filtering



$. eq ( index )

Reduce the set of matched elements to the one at the specified index.



$. first ( )

Reduce the set of matched elements to the first in the set.



$. last ( )

Reduce the set of matched elements to the final one in the set.



$. has ( selector ), . has ( element )

Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.



$. filter ( selector ), . filter ( fn(index) )

Reduce the set of matched elements to those that match the selector or pass the function's test.



bool. is ( selector | function(index) | jQuery object | element ) 1.6*

Check the current matched set of elements against a selector and return true if at least one of these elements matches the selector.



$. map ( fn(index, element) )

Pass each element in the current matched set through a function, producing a new jQuery object containing the return values..



$. not ( selector ), . not ( elements ), . not ( fn( index )

Remove elements from the set of matched elements.



$. slice ( start [, end]

Reduce the set of matched elements to a subset specified by a range of indices.

标签:jQuery,selector,elements,name,列表,学习,set,element,matched
From: https://blog.51cto.com/u_16179085/6663477

相关文章

  • jQuery 中 .eq( index ) 的用法
    1、jQuery 中.eq(index) 的用法 :运行下面的例子及明白了。  <!DOCTYPEhtml><html><head><style>div{width:60px;height:60px;margin:10px;float:left;border:2pxsolidblue;}.blue{background:blue;}</style><scr......
  • 列表生成器
    #自动生成123l=list(range(1,4))print(l)#求1*12*23*3l2=[]forxinrange(1,4):l2.append(x*x)print(l2)#简化print([x*xforxinrange(1,4)])#求x*x中的偶数print([x*xforxinrange(1,4)ifx%2==0])#求双层循环print([m+nfor......
  • c++模板相关学习--泛型编程
     类模板基础#define_CRT_SECURE_NO_WARNINGS#include<iostream>usingnamespacestd;#include<string>template<classNAMETYPE,classAGETYPE=int>//类模板中可以有默认参数classPerson{public:Person(NAMETYPEname,AGETYPEage){......
  • DBS学习笔记(三):RDS 备份
    RDS备份RDS支持自动备份实时捕获事务日志默认情况下启用,保留期为7天(0-35天保留期,0=禁用自动备份)您可以提供备份窗口时间和备份保留天数第一个备份是完整备份,后续备份是增量备份数据存储在S3存储桶中(由RDS服务拥有和管理,您不会在S3控制台中看到它们)建议使用Multi-AZ......
  • Pollard-Rho 分解算法学习笔记
    Pollard-Rho分解算法Pollard-Rho算法是一种用于快速找到\(n\)的一个非平凡约数的方法。生日悖论在不少于\(23\)个人中至少有两人生日相同的概率已经大于\(50\%\)。更一般的形式,随机选取在\(\left[1,N\right]\)范围内的整数,期望到第\(O(\sqrt{N})\)个出现重复。用下面的方......
  • 博弈论之SG函数 学习笔记
    在许多地方曾经行过这样一个小游戏,摆出三堆硬币。分别包含3枚、5枚、7枚。两人轮流行动每次可以任选一堆,从中取走任意多枚硬币,可把一堆取完,但不能不取。取走最后一枚硬币者获得胜利。这类游戏可以推广为更加一般的形式:给定\(n\)堆物品,第\(i\)堆物品有\(A_i\)个。两名玩......
  • OpenCV计算机视觉学习(14)——浅谈常见图像后缀(png, jpg, bmp)的区别(opencv读取语义分割m
    如果需要处理的原图及代码,请移步小编的GitHub地址传送门:请点击我如果点击有误:https://github.com/LeBron-Jian/ComputerVisionPractice 本来不想碎碎念,但是我已经在图像后缀上栽倒两次了。而且因为无意犯错,根本找不到问题。不论是在深度学习的语义分割中,还是在图......
  • Java学习
    JDBC核心api使用步骤:1注册驱动,依赖的jar包,进行安装2.建立连接connection3.创建发送SQL语句对象4.statement对象(小汽车),发送SQL语句到数据库并且返回获取结果5.解析结果集6.销毁(释放)资源:释放connection 释放statement 释放resultset......
  • 公共操作-推导式(集合、列表、字典)
    1'''2Python推导式(Comprehensions)是一种简洁而强大的语法,用于创建新的数据结构(如列表、集合和字典)或对现有数据结构进行转换。3它可以使用更简单的方式完成迭代、筛选、映射等操作。45'''6#1.循环生成列表7#1.1准备⼀个空列表8list1=[]9#1.2书......
  • RPA开发者要失业?用ChatGPT写RPA脚本?-RPA学习天地
     随着人工智能技术的不断发展,AI已经开始在多个领域发挥着越来越重要的作用。从文案生成到图片设计,从代码审核到代码生成,AI已经开始在各种任务中取代人类的工作。即使是技术壁垒比较高的程序员,也已经开始将代码审查和生成的任务交给AI来完成。 在RPA开发领域中,通过RPA拖拉......