阅读背景:

jQuery序列化后的表单值转换成Json

来源:互联网 
$.fn.serializeObject = function()
{
    var o = {};
    var a = this.serializeArray();
    $.each(a, function() {
        if (o[this.name] !== undefined) {
            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;
};$.fn.serializeObject = function()
{
    v



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: