How to make this into a two-dimensional array, JS control, jquery, can be submitted to the background, the background to parse the two-dimensional array?

Source: Internet
Author: User
How to make this into a two-dimensional array, JS control, jquery, can be submitted to the background, the background to parse the two-dimensional array?? Tokyu


This is the front-end HTML code to write three modules, each module has a module ID, the module has a lot of sub-function check box, when you select a module, some modules under the sub-function submission time, the background receives only an array or JSON string, and then to parse the array or JSON, At the same time, the front desk has a character ID.
Database fields have mid roleid marks explain three fields below, mid and Roleid are many-to-many, composite primary key relationships, Mid module Id,roleid role id,marks function meta-codes under this module ( This is the value of the check box is added or the value of the operation is a constant, here does not care about the module check box value How to operate, anyway, is a constant, I ask the front end of the selection of those check box value after the use of JS or jquery how to control it, I think it is to select the check box to assign an array, and then submit the better, but I do not know how to write, there is a better solution to say, the best is the kind of code, I just get started PHP, ask the big God to plan????
------to solve the idea----------------------
Use a custom attribute for the child ID when clicked
Determine if the child ID has this custom attribute, and then put the value and ID of input that owns this custom attribute into an array ...

------to solve the idea----------------------

Print_r ($_post);
Test it yourself and you'll know.



















------to solve the idea----------------------

Simulates one of the following

The code is as follows
[code=php]




Choose












[/code]
------to solve the idea----------------------
I don't know if it's LZ.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.