csdnceshi62 2010-06-14 16:19 采纳率: 100%
浏览 51

jQuery数组提交

I have a page where there are 117 input fields. What i want is to submit them via Jquery ajax. What i am thinking is to make an array and send them by this way. I would like to ask how is it possible to take all inputs and then to put them in an array and then retrieve them from the php file (for example, should i do explode,or for each..etc??) The input fields are not in a form (just in div with id = "config") Thanks.

  • 写回答

2条回答 默认 最新

  • weixin_33739523 2010-06-14 16:25
    关注

    Stringify the data on the client side into JSON(there is a stringifier available here). Then, on the server-side use json_decode($json_str).

    Another option is to put all those input fields into an actual form and then use jQuery's serialize() (which would actually be a whole lot easier).

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记