首页 > 代码库 > jQuery学习笔记
jQuery学习笔记
1. 基础语法:$(selector).action()
2. 基础选择器
1) All Seletor $("*")2) Class Selector $(".class")3) Element Selector $("element")4) ID Selector $("#id")5) Multiple Selector $("selector1, selector2, selectorN")
3. 属性选择器
1) Attribute Contains Prefix Selector [name|="value"] $("[attribute|=‘value‘]") 引号可选2) Attribute COntains Selector [name*="value"] $("attribute*=‘value‘]")3) Attribute Contains Word Selector [name~="value"] $("[attribute~=‘value‘]")4) Attribute Equal with Selector[name="value"] $("[attribute=‘value‘]")5) Attribute Not Equal Selector [name!="value"] $("[attribute!=‘value‘]")6) Attribute Ends With Selector [name$="value"] $("[attribute$=‘value‘]")7) Attribute Starts With Selector [name^="value"] $("[attribute^=‘value‘]")8) Has Attribute Selector [name] $("[attribute]")9) Multiple Attribute Selector [name1="value1" [name2="vallue2"] $("[attributeFilter1][attributeFilter2][attributeFilterN]")
4. 基础过滤器
1) :animated Selector $(":animated")2) :eq() Selector a) $(":eq(index)") b) $(":eq(-index)")3) :even Selector $(":even")4) :first Selector $(":first")5) :focus Selector $(":focus")6) :header Selector $(":header")7) :last Selector $(":last")8) :gt() selector a) $(":gt(index)") b) $(":gt(-index)")9) :lt() selector a) $(":lt(index)") b) $(":lt(-index)")10) :not() selector $(":not(selector)")
jQuery学习笔记
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。