文字
分享

返回值:Array<Element(s)>

:text

V1.0概述

匹配所有的单行文本框


示例

描述:

查找所有文本框

HTML 代码:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

<form>

  <input type="text" />

  <input type="checkbox" />

  <input type="radio" />

  <input type="image" />

  <input type="file" />

  <input type="submit" />

  <input type="reset" />

  <input type="password" />

  <input type="button" />

  <select><option/></select>

  <textarea></textarea>

  <button></button>

</form>

jQuery 代码:

1

$(":text")

结果:

1

[ <input type="text" /> ]


上一篇::input下一篇::password