目前遇到的问题,表单页面有多个不同name数组格式的input
主要代码格式如下
<input type="text" name="oc[]" value="aoo">
<input type="text" name="dc[]" value="dcc">
<input type="text" name="ec[]" value="5">
<input type="text" name="oc[]" value="acc">
<input type="text" name="dc[]" value="coo">
<input type="text" name="ec[]" value="6">
以此类推
如何用jquery的方法,把oc[] dc[] ec[]相同的name的value值,
组成以下格式
我想要达到的结果,然后以这种格式用ajax的方式提交表单
oc:['aoo','acc']
dc:['dcc','coo']
ec:['5','6']