Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collect all the items in a form in jQuery

How do I collect all the checkboxes and dropdown list items in jQuery for saving?

like image 203
Greens Avatar asked Jun 16 '09 15:06

Greens


1 Answers

Or, for recent versions of jquery you can use:

http://docs.jquery.com/Ajax/serialize - to a URL encoded string person.name=john&person.age=20

or

http://docs.jquery.com/Ajax/serializeArray - to JSON

like image 192
ScottE Avatar answered Sep 23 '22 03:09

ScottE