js 定义一个数组 var array = new Array();然后把变量放到数组中。jquery的 ajax方法传递数组到后台。具体用法你可以搜搜jquery ajax
组装成json。后台和前端都能很好的交互。