jQuery Ajax 操作函数:
serialize(): 将表单内容序列化为字符串
serializeArray():序列化表单元素,返回JASON数据
语法:
$(selector).serialize();
$(selector).serializeArray();
返回的数据结构:
serialize():a=1&b=2&c=3&d=4&e=5
serializeArray():
[
{ name: a value: 1 },
{ name: b value: 2 },
{ name: c value: 3 },
{ name: d value: 4 },
{
name: e
value: 5
}
]