jQuery选择器

1、jQuery 基础选择器

       1.1        id选择器    

       1.2        element选择器

       1.3       class选择器

       1.4       *选择器

       1.5       select选择器

       1.6       ance desc选择器

       1.7       parent > child选择器

       1.8       prec + child选择器    

       1.9       prev + next选择器            相邻下一个元素

       1.10      prev + siblings选择器       相邻兄弟元素

 

2、jQuery    过滤选择器

       2.01        first   过滤选择器

       2.02        eq(index) 过滤选择器

       2.03         :contains(text) 过滤选择器

       2.04         :has(selector) 过滤选择器

       2.05         :hidden() 过滤选择器

       2.06         :visible() 过滤选择器

       2.07         [attributr=value] 属性选择器

       2.08         [attributr!=value] 属性选择器

       2.09         [attributr*=value] 属性选择器

       2.10       :first-child 元素过滤选择器

       2.11       :last-child 元素过滤选择器

 

3、jQuery    表单选择器

       3.01       :input 表单选择器

       3.02       :text 表单选择器

       3.03       :password 表单选择器

       3.04       :radio 表单选择器

       3.05       :checkbox表单选择器

       3.06       :submit表单选择器

       3.07       :image表单选择器

       3.08       :btton表单选择器

       3.09       :checked表单选择器

       3.10       :selected表单选择器


4、jQuery     DOM选择器

       4.01       attr()控制方法的属性

       4.02       操作元素的内容

                          (1) html()用来获取和修改元素的html()   

                          (2) text()用来获取和修改元素的text()   

                          (3) val()用来和修改表单元素的value值

       4.03      attr()控制方法的样式

                          (1) addClass()增加元素的样式名称   

                          (2) css()将样式的属性内容写在括号中

       4.04       移除属性和样式

                          (1) removeAttr(name)移除属性名   

                          (2) removeClass()移除样式名

       4.05       append()向指定的元素中追加内容    append($content) 被追加的content参数,可以是字符、HTML元素标记,还可以是一个返回字符串内容的函数。    

 

       4.06      appendTO() 向指定的元素内插入内容   $(content).appendTo(selector)     参数content表示需要插入的内容,参数selector表示被选的元素,即把content内容插入selector元素内,默认是在尾部。    

        

       3.07       before()在元素前插入内容    $(selector).before(content)

                     after()在元素前插入内容       $(selector).after(content)         

                      content表示插入的内容,可以是元素、HTML字符串。

      3.08    clone()复制元素   $(selector).clone()      seleceot可以是元素或HTML内容。

         3.09    替换内容 replaceWith()    replaceAll()     都可以用于替换元素或元素中的内容

                    $(selector).replaceWith(content)$(content).replaceAll(selector)

 

      3.10 each()   遍历指定的元素集合     $(selector).each(function(index))

        

      3.10  remove()删除所选元素本身和子元素   

   添加过滤参数指定需要删除的某些元素

               empty()方法删除元素 只删除所选元素的子元素。

 

posted @ 2016-05-01 00:14  此夏_唯美  阅读(203)  评论(0)    收藏  举报