博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jQuery选择器和API方法介绍
阅读量:3908 次
发布时间:2019-05-23

本文共 962 字,大约阅读时间需要 3 分钟。

九大选择器:

a: 基本选择器: 5

b: 层级选择器: 4

可见选择器:

      
Value 1
Value 2
Value 3

属性选择器:

      

Hello!

子元素选择器

      
  • John
  • Karl
  • Brandon
  • Glen
  • Tane
  • Ralph
  • Marry
  • jack

表单选择器:

      

表单属性选择器:

      

API方法:

text();

html(); 文本:带标签:
val();
value属性: 可以使用该方法:
css();
attr();
addClass();
each();
size();获得个数:
length:$对象,数组的长度。

数组的遍历:

  	

下面是一堆API方法的使用例子:

转载地址:http://vgmen.baihongyu.com/

你可能感兴趣的文章
Python sort sorted OrderDict
查看>>
Python dict sort
查看>>
Python lambda
查看>>
Python modify string in place
查看>>
Python dict del
查看>>
Http header
查看>>
HTTP Header
查看>>
ASCII - American Standard Code for Information Interchange
查看>>
进制转换
查看>>
Python L suffix - indicated long integer literals before Python3
查看>>
URL shortner
查看>>
Django short url
查看>>
Tech Blog
查看>>
Logon System Design
查看>>
Python yield
查看>>
Sina API OAuth
查看>>
Python supervisor
查看>>
dict & set
查看>>
Common Multiple and Least Common Multiple(LCM)
查看>>
Greatest Common Divisor (GCD) - Euclidean algorithm
查看>>