How do I collect all the checkboxes and dropdown list items in jQuery for saving?
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
One way is to use the jQuery Form plugin, like this:
$('#myFormId').formSerialize();
From the formSerialize API documentation :
Serializes the form into a query string. This method will return a string in the format: name1=value1&name2=value2
$('#myFormId').formSerialize(); is a plugin and maybe not necessary. The core function serialize() is better.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.