How to select all textareas and textboxes using jQuery?

后端 未结 5 2057
有刺的猬
有刺的猬 2020-12-02 15:03

How can I select all textboxes and textareas, e.g:


and


         


        
5条回答
  •  春和景丽
    2020-12-02 16:10

    Simply use $(":input")

    Example disabling all inputs (textarea, input text, etc):

    $(":input").prop("disabled", true);

提交回复
热议问题