Transferred from: http://blog.csdn.net/csdnzhangtao5/article/details/52981541
The serialize (), Serializearray () methods are all jquery user serialized forms, serialization of data values for AJAX submissions
In Chrome's console we clearly see that Serializearray () returns a JSON array, each object of the array is made up of a JSON string, and we can see that each JSON string consists of two key-value pairs, each of which has a name, Value consists of, in fact, the value assigned to the JSON string by Serializearray (), which assigns the value of the name of each Dom in the form to a JSON string to the values of name,dom.
Then we just need to add the extra content:
var Dataparam = $ ("#updateChannelForm"). Serializearray ();
For example I want to add sex= "male"
Dataparam.push ({"name": "Sex", "value": "Male"}) it's OK.
We see that the Serialize () method serializes the contents of the form into a string
"id=58&channeltype=2&subtitle=591teststetets&extattrvalueid=599"
Then we just need to add the extra content:
var Dataparam = $ ("#updateChannelForm"). Serialize ();
For example I want to add sex= "male"
Dataparam =dataparam + "&" + "sex= male"
jquery Serializearray (), serialize () Add data