Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery selector question (how to select all input fields on a form EXCEPT buttons and checkbox)

Tags:

jquery

$("#myform :input:not(:checkbox):not(:button)");

You can use :not() combined to :checkbox and :button selectors:

$("#myform :input:not(:button):not(:checkbox)");

and test it with success with the example provided in the documentation of :input

EDIT: :input also selects textarea, select, button and input[type="hidden"] according to documentation (and a useful example)