serialize : 序列表表格内容为字符串, 返回的是一个字符串
var serializeStr = $("form").serialize();
result : username=forrest
&passwd=1234
&gender=0
&interest=swimming
&interest=running
&interest=readBook
serializeArray : 序列化表格元素 (类似 '.serialize()' 方法) 返回 JSON 数据结构数据
var fields = $("select, :radio").serializeArray();
jQuery.each( fields, function(i, field){
$("#results").append(field.name + "=" +field.value + "; ");
});
result : username=forrest;
passwd=1234;
gender=0;
interest=swimming;
interest=running;
interest=readBook;