How do I convert all elements of my form to a JavaScript object?
(如何将表单的所有元素转换为JavaScript对象?)
I'd like to have some way of automatically building a JavaScript object from my form, without having to loop over each element.
(我希望有一些方法可以自动从表单中构建JavaScript对象,而不必遍历每个元素。)
I do not want a string, as returned by$('#formid').serialize();
(我不需要$('#formid').serialize();
返回的字符串$('#formid').serialize();
)
$('#formid').serializeArray();
(,也不希望$('#formid').serializeArray();
返回的地图)