jquery-3 jquery選擇器

jquery-3 jquery選擇器

1、總結

一句話總結:選擇器使用的時候能夠結合參考手冊,裏面都已經詳細歸類好了。(多用才能熟啊)

 

一、$(:input).css({'color':'#987654'}); 中的css方法中的參數是什麼數據格式?

是json數據格式,也就是jquery中的參數採用的是json數據格式css

 

二、jquery中的參數採用的是什麼數據格式?

json數據格式html

 

 

2、jquery選擇器

一、相關知識

選擇器:
1.經常使用
    1)#id
    2)ele
    3).class
    4)*
    5)sel1,sel2
2.層級
    1)ancestor descendant
    2)parent > child
    3)prev + next
    4)prev ~ siblings
3.基本
    1):first
    2):last
    3):not
    4):even
    5):odd
    6):eq
    7):gt
    8):lt
4.內容
    1):has
    2):parent
    3):empty
5.屬性
    1)[name]
    2)[name=user1]
    3)[name!=user1]
    4)[name^=user]
    5)[name$=user]
    6)[name*=er]
    7)[name=user1][name*=er]
6.子元素
    1)nth-child
    2)first-child
    3)last-child
    4)only-child
7.表單
    1):input
    2):text
    3):password
    4):radio
    5):checkbox
    6):submit
    7):reset
    8):button
    9):file
    10):hidden
8.表單屬性
    1):checked
    2):selectedjquery

 

二、參考手冊地址

:input | jQuery API 3.2 中文文檔 | jQuery API 在線手冊
http://jquery.cuishifeng.cn/input.htmljson

相關文章
相關標籤/搜索