欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery form表單序列化為對象的示例代碼

 更新時間:2014年03月05日 11:05:09   作者:  
這篇文章主要介紹了jquery form表單序列化為對象具體實現(xiàn),需要的朋友可以參考下
復(fù)制代碼 代碼如下:

$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [ o[this.name] ];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
}

相關(guān)文章

最新評論