先上一个Demo <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text
解析页面表单元素 parseForm: function () { var data = {}; $(this).find('input').each(function () { switch ($(this).attr('type')) { case 'radio': case 'checkbox': if ($(this).prop('checked')) { data[$(this).attr('name')] = $(this).val(); } break; default: data