jQuery selector for selecting an input field with a class

前端 未结 4 1387
一整个雨季
一整个雨季 2021-02-05 17:05

I have



&l         


        
4条回答
  •  -上瘾入骨i
    2021-02-05 17:50

    $(':input.required[type="text"]')
    

    EDIT:

    This will be slightly faster:

    $('input.required[type="text"]')
    

    Note:

    :input will get all form elements (