Jquery selector

column-selector:jQuery 列选择器 jQuery 列单元格选择器 这个插件向 jQuery 选择器 API 添加了一个新的选择器,用于按列索引检索表格单元格。 它透明地支持具有列和行跨度的表格,无论您的表格多么复杂。 语法简单且与其他 jQuery 选择器相似,因此学习曲线非常小。 以下示例显示如何选择表格第四列中的所有单元格。 $('#mytable tbody td:nth-col(4)'); 选择器可以采用多种类型的参数来选择列,例如关键字、数字索引和方程。 这些在 API 部分有更详细的解释。 应用程序接口 这个插件向 jQuery 选择器 API 添加了一个新的伪选择器,称为nth-col 。 此外,它还向名为nthCol的 jQuery 函数命名空间添加了一种新方法(使用哪种方法取决于您的用例,请参阅常见问题部分了解详细信息。)选择器和扩展函数都提供相同的功能并接受相同的参数。 可以使用以下参数: 甚至 选 立即下载

jQuery selectors and examples

jQuery Selectors and Attribute Selectors
SelectorExampleDescription
List accurate as of jQuery 1.3
*$(’*');This selector is a wild card method and will select all elements in a document.
#id$(’#id’);This selector selects an element with the given ID.
.class$(’.class’)The class selector will gather all elements in the document with the given class name
element$(’element’)This selector will collect all elements in a document with the given tag name i.e. table, ul, li, a etc.
a, b, c. … n$(’th, td, .class, #id’)This method can use multiple selection patterns to collect elements.
parent child$(’li a’)This will select all “a” elements that are a descendant of “li”
a > b$(’table > tr’);This will select all b elements which are a child element of a or in our example all tr elements in a table or tables.
a + b$(’li + a’);This will select all “a” elements that are an immediate descendant of “li” in our example.
a ~ b$(’p ~ ul’);This selector will select all “ul” elements that are a sibling of “p”
:first$(’ul li:first’);Returns the first element in a result set
:first-child$(’ul li:first-child’);Returns the first child element of the parent element.
:last$(’ul li:last’);Returns the last element in a result set
:last-child$(’ul li:last-child’);Returns the last child element of the parent element.
:only-child$(’div p:only-child’);Returns elements which are the only child of the parent element.
:not(a)$(’input:not(:checked)’);Returns all elements that are not “a” on in our example all input elements that are not checked
:has(a)$(’div:has(p)’);Returns all elements with a descendant that matches a in out example a “div” that contains a “p”.
:odd$(’ul li:odd’);Returns all odd elements in a result set (zero based)
:even$(’ul li:even’);Returns all even elements in a result set (zero based)
:eq(n)$(’ul li:eq(n)’);Returns a numbered element identified by n (zero based)
:gt(n)$(’ul li:gt(n)’);Returns all elements in a result set greater than n (zero based)
:lt(n)$(’ul li:lt(n)’);Returns all elements in a result set less than n (zero based)
:nth-child(n)$(’ul li:nth-child(n)’);Returns the nth child in a result set (one based)
:nth-child(odd)$(’ul li:nth-child(odd)’);Returns all odd numbered elements in a result set (one based)
:nth-child(even)$(’ul li:nth-child(even)’);Returns all even numbered elements in a result set (one based)
:nth-child(formula)$(’ul li:nth-child(3n)’);Returns every nth child in a result set. In our example every third child (one based)
:header$(’:header’);Returns all heading elements e.g. h1, h2, etc.
:animated$(’ul:animated’);Returns elements with an animation currently in progress
:contains(text)$(’:contains(hello)’);Returns all elements containing the passed string
:empty$(’:empty’);Returns all elements that contain no child nodes
:parent$(’li:parent’);Returns all elements that a parent nodes to any other DOM element including text nodes.
:hidden$(’ul:hidden’);Returns all hidden elements that are hidden with CSS or input fields of the type “hidden”
:visible$(’ul:visible’);Returns all visible elements
[attribute]$(’[href]‘);Returns all elements that contain the passed attribute in our example any element with a “href” attribute
[attribute=value]$(’[rel=external]‘);Returns all elements that the passed attribute value is equal to the passed value. In our example ant element with a “rel” attribute equal to “external”
['attribute!=value']$(’[rel!=external]‘);Returns all elements that the passed attribute value is not equal to the passed value. In our example ant element with a “rel” attribute that is not equal to “external”
[attribute!=value]$(’[class^=open]‘);Returns all elements that the passed attribute value start with the passed value. In our example any element thats “class” attribute value begins with “open”
[attribute$=value]$(’[id$=-wrapper]‘);Returns all elements that the passed attribute value ends with the passed value. In our example any element whos “id” ends with “-wrapper”
[attribute*=value]$(’[class*=offer]‘);Returns all elements that the passed attribute value contains the passed value. In our example any element whos “class” contains the string “offer”
:input$(’:input’);Returns only input elements of the tag name input, select, textarea and button
:text$(’:text’);Returns only input elements of the type “text”
:password$(’:password’);Returns only input elements of the type “password”
:radio$(’:radio’);Returns only input elements of the type “radio”
:checkbox$(’:checkbox’);Returns only input elements of the type “checkbox”
:submit$(’:submit’);Returns only input elements of the type “submit”
:image$(’:image’);Returns only input elements of the type “image”
:reset$(’:reset’);Returns only input elements of the type “reset”
:file$(’:file’);Returns only input elements of the type “file”
:button$(’:button’);Returns only input elements of the type “button”
:enabled$(’:enabled’);Returns all enabled input elements
:selected$(’:selected’);Returns the selected element in a select list.
:disabled$(’:disabled’);Returns disabled input elements
:checked$(’:checked’);Returns checked input elements of the type radio or checkbox.
jquery警告提示框 这是从网上收集的两个别人使用jquery做的自定义警告提示框,分享到这里供大家学习。里面是两个demo,这两个都是属于简单易懂易改的。 立即下载

相关推荐

Jquery.DateSelector 下拉框日期控件

基于 jquery 封装的 日期控件。 详情 : http://blog.csdn.net/moxie_yan/article/details/43274729

jqGrid的列选择columnChooser使用

强调文本 强调文本 1、要引用的文件 jquery-ui.js,jquery-ui.css,ui.multiselect.css,ui.multiselect.js jquery.jqGrid.js和jquery就不用说了

qq_16181669的博客 383

jquery.selector-px.js

jquery.selector-px.js 在微信端实现苹果的下拉框的选取

网页布局四之jQuery-easyUI的datagrid的基本应用

在使用easyuI时,要先引入四个包,在此就不重复了。 一、要使用easyui的datagrid一定要先在或中引入class,例如: <table id="dg" class="easyui-datagrid" title="我的DataGrid" style="width:500px;height:600px;" data-options=" loadMsg:'数据加

Anglebeat的专栏 2万+

AI赋能运筹优化:从参数生成到智能求解的工程实践

运筹学通过线性规划、整数规划等数学模型,为供应链、物流、生产排程等复杂决策问题寻找最优解,其核心价值在于提升资源利用效率与决策科学性。传统方法依赖精确的输入参数与专家经验,面临数据不准、建模门槛高、求解调优难等挑战。人工智能技术的引入,正从原理层面重塑这一流程:通过深度学习模型生成更贴合现实的动态参数(如需求分布、行驶时间),利用自然语言处理降低建模门槛,并借助强化学习对求解器进行智能参数调优。这种AI与运筹学的融合,在工程实践中显著提升了优化系统的自适应能力与求解效率,使其在应对实时交通、柔性生产调度等动

weixin_26913055的博客 603

【RL+空战】学习记录01:jsbsim 仿真环境初次学习,F16 战机起飞

【代码】【RL+空战】学习记录01:jsbsim 仿真环境初次学习,F16 战机起飞。

weixin_41369892的博客 906

JQuery警告:Duplicated jQuery selector

1.如果你在一个函数中重复写这个id的选择器,你就可能遇到这种警告,而这种警告通常实在Intellj系列的编辑器中显示,警告截图如下: 上面代码中两处使用了同一个id选择器,JQuery建议你使用一个变量去存储这个选择器,而不是每次用的时候便拿来调用一下,它不会帮你做缓存,而是重新去取。可以参考StackOverflow上的回答:https://stackoverflow

Jalen备忘录 2万+

GEE去云处理代码段解读(位运算)

GEE去云处理代码段解读,包含位运算符号解读、bitwiseAnd()函数、eq()函数解读

jiekeheiguanglan的博客 2075

jQuery 重复选择器警告(Duplicated jQuery selector)

文章目录1 警告截图2 解决办法:定义变量 = 选择器 1 警告截图 2 解决办法:定义变量 = 选择器 /* 原因:JQuery 建议去用一个变量去存储这个选择器 因为每次使用都会重新读取而不会缓存 */ function myFunction() { let p1 = $("#p1"); // ← 看这里 let w = p1.width(); let h = p1.height(); console.log("w = " + w, "h =

鱼丸丶粗面 3285

基于立创EDA的8口全千兆POE交换机设计详解:RTL8370N芯片与90W大功率供电方案

本文详细解析了基于立创EDA设计的8口全千兆POE交换机方案,核心采用RTL8370N交换芯片与支持90W大功率供电的IEEE 802.3bt标准PD芯片。文章深入探讨了PSE/PD供电管理、电源架构设计、电路细节及关键散热方案,为DIY或学习POE交换机硬件设计提供了完整的开源实践指南。

weixin_29050829的博客 1万+

手把手教你用西门子博图V18配置阿特拉斯PF6000拧紧枪PN通讯(附完整GSD文件与ToolsTalk配置文件)

本文详细介绍了如何使用西门子博图V18配置阿特拉斯PF6000拧紧枪的PN通讯,包括硬件连接、网络参数规划、ToolsTalk软件配置及博图工程设置。通过完整的GSD文件和配置文件,帮助工程师快速实现高精度拧紧设备与PLC的高效通讯,适用于汽车装配和电子制造等工业自动化场景。

weixin_42662293的博客 623

JQuery的on函数里面的selector作用

之前不知道on函数里面的selector是用来干嘛的,查了一下官方文档,里面是这样描述的 If selector is omitted or is null, the event handler is referred to as direct or directly-bound. The handler is called every time an event occurs on the selected elements, whether it occurs directly on the elem

qq_44739238的博客 527

java实现mavlink协议解析与封包上传数据,实现mavlink数据交互,附带代码、详解

本篇文章介绍了使用java来进行mavlink协议解析,封包与解包的过程,并附带源码供大家使用。MAVLink(Micro Air Vehicle Link,微型空中飞行器链路通讯协议)是无人飞行器与地面站(Ground Control Station ,GCS)或云端服务器之间通讯,以及无人飞行器之间通讯最常用的协议。它已经在PX4、APM、PIXHAWK和Parrot AR.Drone飞控平台上进行了大量测试。

qq_30279827的博客 1459

关于jquery的 selector Hierarchy

4 Nights 如果我想获得4,应该如何用selector Hierarchy呢? 先来看一下 child selector Description: Selects all direct child elements specified by "child" of elements specified by "parent".

918

VS Code下载安装与使用教程

VSCode下载安装与使用教程

weixin_46713695的博客 4万+

禁止使用服务器 IP 访问 Apache 环境下的 Web 站点

通过在 Apache 的配置文件中添加适当的指令,我们可以轻松地禁止使用服务器 IP 地址访问我们的 Web 站点。在 Apache 环境下,有时我们希望禁止用户使用服务器的 IP 地址直接访问我们的 Web 站点,而只允许使用域名进行访问。现在,当用户尝试使用服务器的 IP 地址来访问你的网站时,他们将会被拒绝访问,只有通过域名才能正常访问。为了实现这个目标,我们可以通过 Apache 的配置文件进行相应的设置。表示禁止对根目录的访问权限,即禁止使用服务器的 IP 地址进行访问。

TpCode的博客 950

selector1,selector2,selectorN选择器(jQuery)

1、selector1,selector2,selectorN:将每一个选择器匹配到的元素合并后一起返回。                                                        你可以指定任意多个选择器,并将匹配到的元素合并到一个结果内。 2、实例 selector.html: selector1,selector2,selectorN选

游海东的技术专栏 2275

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

jQuery的selector和context属性

从jQuery1.3开始添加了这2个属性. 现在我们来看看那这2个属性的用法. selector属性是一个字符串.存储的字符串是选择器. HTML代码: <div class="guo">hello...

QDY5945的博客 434

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Duplicated jQuery selector

IDEA编写前端警告Duplicated jQuery selector idea真是想尽办法帮我们规范代码,这玩意看着虽然不影响程序运行,但强迫症看着属实不爽,截图: 初次使用,不太熟练。。 出现这个问题为重复使用了一个id选择器,JQuery建议去用一个变量去存储这个选择器,因为每次使用都会重新读取而不会缓存。解决方式就是var一个变量呗,非强迫症略过。 ...

qq_46042620的博客 365

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

为什么$(selector)之后,返回的是jQuery对象?

1)为什么$(selector)之后,返回的是jQuery对象? 答:从jQuery的源代码中,我们可以知道:var $ = jQuery.因此当我们$(selector)操作时,其实就是jQuery(selector),创建的是一个jQuery对象.当然正确的写法应该是这样的:var jq = new $(selector);而jQuery使用了一个小技巧在外部避免了new,在jque

anythings的专栏 1281

jquery_selector02

jquery中特有的选择器 //:even 偶数(从0开始),odd奇数 $(".one li:even").css('color','red'); $(".one li:odd").css("font-size","50px"); //:eq(index),index 从0开始 $(".one li:eq(0)").css("border","1px solid red") //:n

yahooG的博客 285

jQuery(selector,context)函数参数含义

jQuery(selector,context)函数参数含义和理解,欢迎拍砖

Acmera-播客分享 3596

关于jQuery对象的两个属性selector和context

Context参数需要是一个正常工作的节点对象(DOM对象,而不jQuery对象)。虽然传递jQuery对象也可以起到限定查找范围的作用,但是这样的话,那么jQuery对象的context属性就会变成整个Document对象。如果您看完了DEMO,有一些不同的看法的话,请尽管拍砖,不甚感激。 恩~~通过上面的篇幅以及DEMO,大家已经基本上知道了jQuery对象的两个属性select...

HEHEEH123的专栏 3345

[jQuery] Selector

(1) Item name, class, iditem name: div $("div") class: .div $(".div") ID: #div $("#div")eg: $(function(){ $("div").css('color', 'red'); }); (2) 群组 后代 通配群组 div,span,em $("div,span,

linjiayuqazwsx的博客 720

jQuery(html,[ownerDocument]). jQuery([selector,[context]])

1. jQuery(html,[ownerDocument]) jQuery(html代码)它的作用是将一个dom对象包装成jquery对象。 问题:什么是jquery对象? 我们的jquery中定义的方法与属性,只有jquery对象可以调用。   这个核心函数的作用是将一个dom对象包装成了jquery对象 而它的第一个参数是html代码. 它的第二个参数是可选,它用于设置dom的

boss_way的博客 549
上一篇: 在ASP.NET中实现Model-View-Presenter(MVP)
下一篇: sql group by
eric0622
博客等级 码龄18年 1粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值