$("label + input") 匹配所有紧接在 prev 元素后的 next 元素
描述:
匹配所有跟在 label 后面的 input 元素
HTML 代码:
<form>
<label>Name:</label>
<input name="name" />
<fieldset>
<label>Newsletter:</label>
<input name="newsletter" />
</fieldset>
</form>
<input name="none" />
jQuery 代码:
$("label + input")
结果:
[ <input name="name" />, <input name="newsletter" /> ]
随机推荐
- Android Annotations 注解例子
1.AndroidAnnotations官网: http://androidannotations.org/ (也许你需要FQ) 2.eclipse中使用androidannotations的配置方法 ...
- imx6 关闭 otg host
参考文档: http://www.cnblogs.com/zengjfgit/p/4711336.html make menuconfig 去掉Support for DR host port on ...
- C#中override和overload的区别
重载应该叫overload,重写叫override:重载某个方法是在同一个类中发生的!重写是在子类中重写父类中的方法. 1.override: 父类:public virtual string T ...
- Exception not a valid month
oracle中的to_date('date','pattern') 其中的date和pattern格式应该要一样 SELECT to_date('2016-03-29 00:00:00','yyyy- ...
- Linux就这个范儿 第19章 团结就是力量 LSB是Linux标准化基地(Linux Standards Base)的简称
Linux就这个范儿 第19章 团结就是力量 LSB是Linux标准化基地(Linux Standards Base)的简称 这个图片好可爱,它是LSB组织的图标.你肯定会问:“图标这么设计一定有说 ...
- PHP接口类interface的正确使用方法
对于那些初学PHP语言的人来说,对于PHP的接口类也许了解的还不是很深入,接下来我们就来具体讲述PHP接口类interface的使用方法. 如何正确运用PHP XMLReader解析XML文档 深入解 ...
- Vue.2.0.5-组件
什么是组件? 组件(Component)是 Vue.js 最强大的功能之一.组件可以扩展 HTML 元素,封装可重用的代码.在较高层面上,组件是自定义元素, Vue.js 的编译器为它添加特殊功能.在 ...
- Starting MySQL...The server quit without updating PID file
修改mysql的配置文件(my.cnf)后,再启动mysqld的时候报错: # service mysqld start Starting MySQL...The server quit withou ...
- iOS中scrollview是否要回弹
1. @property(nonatomic) BOOL bounces //当滚动到内容边缘是否发生反弹,default is YES.2. @property(nonatomic) BOOL al ...
- UI design principles
Master's conclusion: 1. fix a color pattern 2. fix the frames the UI will use 3. fix the subject tha ...