jQuery的选择器中的通配符[id^='code'] 等示例及说明
1.选择器
(1)通配符:
$("input[id^='code']");//id属性以code开始的所有input标签
$("input[id$='code']");//id属性以code结束的所有input标签
$("input[id*='code']");//id属性包含code的所有input标签
(2)根据索引选择
$("tbody tr:even"); //选择索引为偶数的所有tr标签
$("tbody tr:odd"); //选择索引为奇数的所有tr标签
(3)获得jqueryObj下一级节点的input个数
jqueryObj.children("input").length;
(4)获得class为main的标签的子节点下所有<a>标签
$(".main > a");
(5)选择紧邻标签
jqueryObj.next("div");//获取jqueryObj标签的后面紧邻的一个div,nextAll获取所有
2.筛选器
//not
$("#code input:not([id^='code'])");//id为code标签内不包含id以code开始的所有input标签
3.事件
//处理文本框上的键盘操作
jqueryObj.keyup(function(event){
var keyCode = event.which;//获取当前按下键盘的键值,回车键为13
}
4.工具函数
$('#someField').val($.trim($('#someField').val()));//消除空格,语法:$.trim(value)
jQuery的选择器中的通配符[id^='code'] 等示例及说明的更多相关文章
- jQuery的选择器中的通配符[id^='code']或[name^='code']及jquery选择器总结
1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code']&quo ...
- jQuery的选择器中的通配符[id^='code'] 【转】
JQuery 1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='cod ...
- jQuery的选择器中的通配符[id^='code']
1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code']&quo ...
- jQuery的选择器中的通配符[id^='code']或[name^='code']
这两天在做一个专题的时候遇到了一个通配符的问题 //弹层操作$(function(){ //视频播放 $("a[href^='#video']").each(function(in ...
- jQuery的选择器中的通配符总结
1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code']&quo ...
- jQuery选择器中,通配符[id^='code']input[id$='code'][id*='code']
1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code']&qu ...
- Query的选择器中的通配符[id^='code']或[name^='code']
1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code'] ...
- jQuery的选择器中的通配符
(1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code']");// ...
- jQuery的选择器中的通配符使用介绍
$("input[id^='data']");//id属性以data开始的所有input标签 $("input[id$='data']");//id属性以dat ...
随机推荐
- JS控制键盘录入 和 window.event.keycode对照
一.只允许录入整数 1.不允许录入非数字(按下字母键就会提示并清空) function intOnly() { if (!(window.event.keyCode >= 48 &&am ...
- {"errcode":40097,"errmsg":"invalid args hint: [vjNe7xxxxxx8vr19]"}——记录一次微信错误处理
错误情况概述: 启动应用之后,微信调用 相机拍照 等接口是可以正常使用的, 但是过了一段时间(2个小时左右--token/jsapi_ticket的过期时间),微信调用相机拍照的功能失效,启用debu ...
- Oracle导入导出
Oracle 10g 已经引入了数据泵(点击Data Dump)技术,这项技术和之前的exp/imp有哪些好处呢,简单的来说就是恢复和备份速度非常快: 在说明数据泵的使用方法之前,我们先来了解二者的区 ...
- Spark——共享变量
Spark执行不少操作时都依赖于闭包函数的调用,此时如果闭包函数使用到了外部变量驱动程序在使用行动操作时传递到集群中各worker节点任务时就会进行一系列操作: 1.驱动程序使将闭包中使用变量封装成对 ...
- SPI基础知识
Serial Peripheral Interface 是摩托罗拉公司提出的一种总线协议,主要应用在EEPROM,FLASH,实时时钟,A/D转换,以及数字信号处理和数字信号解码器中 是一种高速,全双 ...
- 4-iscsi
Iscsi 1. 创建lvm 2. 安装scsi服务端软件包 第一种(命令模式) 第二种(配置文件模式) 客户端 Node1 寻找scsi服务器上的储存设备 将scsi设备挂载 ...
- NopCommerce 在Category 显示 Store List列表
实现效果如下: 1.在前台Web的Category Menu显示 Store; 2.点击 Store 显示 Store List列表: 3.点击 列表Store 的 Company Name 进入该S ...
- [LeetCode] Sum of Two Integers 两数之和
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Exam ...
- [LeetCode] Implement strStr() 实现strStr()函数
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle ...
- 从2G到5G, 基站天线过去与未来
在蜂窝移动通信系统中,天线是电路信号与空间辐射电磁波的转换器,是移动通信系统的末梢关键组成部分. 从2G到4G,移动基站天线经历了全向天线.定向单极化天线.定向双极化天线.电调单极化天线.电调双极化天 ...