var aa=function(form){
var o={ };
$.each(form.serializeArray(),function(index){
if(o[this['name']]){
o[this['name']] = o [this['name']] "," this['value'];
}else{
o[this['name']] = this['value'];
}
});
return o;
}
Just pass a form object in. After method processing, you can return an object. For example, console.info(aa($( "#myForm"))); You can try this in Firefox browser. It's a very good method.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn